Class RegionArgumentType

java.lang.Object
de.z0rdak.yawp.commands.arguments.region.RegionArgumentType
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<String>

public class RegionArgumentType extends Object implements com.mojang.brigadier.arguments.ArgumentType<String>
  • Field Details

    • VALID_NAME_PATTERN

      public static final Pattern VALID_NAME_PATTERN
  • Constructor Details

    • RegionArgumentType

      public RegionArgumentType()
  • Method Details

    • getRegionType

      public static <S> RegionType getRegionType(com.mojang.brigadier.context.CommandContext<S> context)
    • getRegionIn

      public static IMarkableRegion getRegionIn(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String argName, net.minecraft.world.level.Level level) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getRegion

      public static IMarkableRegion getRegion(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String argName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • 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
    • getTargetRegion

      public static IProtectedRegion getTargetRegion(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String argName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • region

      public static RegionArgumentType region()
      Using this as an actual argument does not work on a server-side only mod, because it needs to be registered in the corresponding registry.
    • getRegionInPlayerDim

      public static IMarkableRegion getRegionInPlayerDim(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String argName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getExamples

      public Collection<String> getExamples()
      Specified by:
      getExamples in interface com.mojang.brigadier.arguments.ArgumentType<String>
    • parse

      public String parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<String>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • listSuggestions

      public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> ctx, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
      Specified by:
      listSuggestions in interface com.mojang.brigadier.arguments.ArgumentType<String>
    • listSuggestionsIn

      public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestionsIn(com.mojang.brigadier.context.CommandContext<S> ctx, com.mojang.brigadier.suggestion.SuggestionsBuilder builder, net.minecraft.world.level.Level level)
    • listRegionsInTargetDim

      public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listRegionsInTargetDim(com.mojang.brigadier.context.CommandContext<S> ctx, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)