Class ArgumentUtil

java.lang.Object
de.z0rdak.yawp.commands.arguments.ArgumentUtil

public class ArgumentUtil extends Object
  • 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

      public static GlobalRegion 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

      public static List<String> getPlayerNamesArgument(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx)
    • 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

      public static String revertCommand(String cmd, String toReplace, String reverted)