Class ArgumentUtil
java.lang.Object
de.z0rdak.yawp.commands.arguments.ArgumentUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetAlertArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static AreaTypegetAreaTypeArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static IMarkableRegiongetChildRegionArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static IMarkableRegiongetContainingOwnedRegionArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static IMarkableRegiongetContainingOwnedRegionArgumentWithMarker(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static DimensionalRegiongetDimRegionFromArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static net.minecraft.resources.ResourceLocationgetDisplayBlockArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static booleangetDisplayGlowArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static DisplayTypegetDisplayTypeArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static booleangetEnableArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static RegionFlaggetFlagArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static Set<RegionFlag>getFlagArguments(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static StringgetFlagMsgArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static StringgetFlagNameArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static FlagStategetFlagStateArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static FlagTypegetFlagTypeArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static GlobalRegionstatic StringgetGroupArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static @Nullable IFlaggetIFlagArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static LevelRegionDatagetLevelDataArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static StringgetNewTeleportAnchorNameArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static booleangetOverrideArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static net.minecraft.server.level.ServerPlayergetOwnerArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static intgetPageNoArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static net.minecraft.server.level.ServerPlayergetPlayerArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) getPlayerNamesArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static Collection<net.minecraft.server.level.ServerPlayer>getPlayersArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static UUIDgetPlayerUUIDArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static intgetPriorityArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static IProtectedRegiongetRegion(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, RegionType regionType) static IMarkableRegiongetRegionArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static IMarkableRegiongetRegionIn(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.world.level.Level level) static StringgetRegionNameArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static LevelRegionDatagetTargetDimRegionArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static IProtectedRegiongetTargetLocalRegionArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static net.minecraft.world.scores.TeamgetTeamArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static StringgetTeleportAnchorNameArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static net.minecraft.core.BlockPosgetTeleportAnchorPosArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack>literal(CommandConstants constant) static booleanmuteArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) static StringrevertCommand(String cmd, CommandConstants toReplace, CommandConstants reverted) static StringrevertCommand(String cmd, String toReplace, String reverted)
-
Constructor Details
-
ArgumentUtil
public ArgumentUtil()
-
-
Method Details
-
literal
public static com.mojang.brigadier.builder.LiteralArgumentBuilder<net.minecraft.commands.CommandSourceStack> literal(CommandConstants constant) -
getLevelDataArgument
public static LevelRegionData getLevelDataArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getDimRegionFromArgument
public static DimensionalRegion getDimRegionFromArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getGlobalRegion
-
getAreaTypeArgument
public static AreaType getAreaTypeArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getRegionNameArgument
public static String getRegionNameArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getDisplayTypeArgument
public static DisplayType getDisplayTypeArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getDisplayBlockArgument
public static net.minecraft.resources.ResourceLocation getDisplayBlockArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getTeleportAnchorPosArgument
public static net.minecraft.core.BlockPos getTeleportAnchorPosArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getTeleportAnchorNameArgument
public static String getTeleportAnchorNameArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getNewTeleportAnchorNameArgument
public static String getNewTeleportAnchorNameArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getDisplayGlowArgument
public static boolean getDisplayGlowArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getRegionArgument
public static IMarkableRegion getRegionArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getRegionIn
public static IMarkableRegion getRegionIn(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, net.minecraft.world.level.Level level) -
getRegion
public static IProtectedRegion getRegion(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, RegionType regionType) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getTargetLocalRegionArgument
public static IProtectedRegion getTargetLocalRegionArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getTargetDimRegionArgument
public static LevelRegionData getTargetDimRegionArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getChildRegionArgument
public static IMarkableRegion getChildRegionArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getContainingOwnedRegionArgument
public static IMarkableRegion getContainingOwnedRegionArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getContainingOwnedRegionArgumentWithMarker
public static IMarkableRegion getContainingOwnedRegionArgumentWithMarker(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getPlayerArgument
public static net.minecraft.server.level.ServerPlayer getPlayerArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getPlayersArgument
public static Collection<net.minecraft.server.level.ServerPlayer> getPlayersArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getPlayerUUIDArgument
public static UUID getPlayerUUIDArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getPlayerNamesArgument
-
getFlagNameArgument
public static String getFlagNameArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getFlagArgument
public static RegionFlag getFlagArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFlagArguments
public static Set<RegionFlag> getFlagArguments(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getIFlagArgument
@Nullable public static @Nullable IFlag getIFlagArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFlagMsgArgument
public static String getFlagMsgArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getFlagTypeArgument
public static FlagType getFlagTypeArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getGroupArgument
public static String getGroupArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getOwnerArgument
public static net.minecraft.server.level.ServerPlayer getOwnerArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getTeamArgument
public static net.minecraft.world.scores.Team getTeamArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAlertArgument
public static boolean getAlertArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
muteArgument
public static boolean muteArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getEnableArgument
public static boolean getEnableArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getFlagStateArgument
public static FlagState getFlagStateArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getOverrideArgument
public static boolean getOverrideArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getPriorityArgument
public static int getPriorityArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
getPageNoArgument
public static int getPageNoArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx) -
revertCommand
public static String revertCommand(String cmd, CommandConstants toReplace, CommandConstants reverted) -
revertCommand
-