Class RegionFlagArgumentType

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

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

    • VALID_FLAG_PATTERN

      public static final Pattern VALID_FLAG_PATTERN
  • Constructor Details

    • RegionFlagArgumentType

      public RegionFlagArgumentType()
  • Method Details

    • flag

      public static RegionFlagArgumentType flag()
      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.
    • getFlag

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

      public static Set<RegionFlag> getFlags(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String argName) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • 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
    • getExamples

      public Collection<String> getExamples()
      Specified by:
      getExamples in interface com.mojang.brigadier.arguments.ArgumentType<String>
    • 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>