Class AddRegionChildArgumentType

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

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

    • VALID_NAME_PATTERN

      public static final Pattern VALID_NAME_PATTERN
  • Constructor Details

    • AddRegionChildArgumentType

      public AddRegionChildArgumentType()
  • Method Details

    • potentialChildRegions

      public static AddRegionChildArgumentType potentialChildRegions()
      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.
    • 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> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
      Lists possible regions which can be added as children.
      These are most likely only regions which have the dimensional region as their parent and are fully contained in the area of the parent region.
      Specified by:
      listSuggestions in interface com.mojang.brigadier.arguments.ArgumentType<String>
    • getExamples

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