Class EnumArgumentIgnoreCase<T extends Enum<T>>

java.lang.Object
org.moddingx.libx.command.EnumArgumentIgnoreCase<T>
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<T>

public class EnumArgumentIgnoreCase<T extends Enum<T>> extends Object implements com.mojang.brigadier.arguments.ArgumentType<T>
A case insensitive version of EnumArgument.
  • Method Details

    • enumArgument

      public static <R extends Enum<R>> EnumArgumentIgnoreCase<R> enumArgument(Class<R> enumClass)
      Creates a new enum argument for the given enum class.
    • parse

      public T parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<T extends Enum<T>>
      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)
      Specified by:
      listSuggestions in interface com.mojang.brigadier.arguments.ArgumentType<T extends Enum<T>>
    • getExamples

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