Class ArgumentTypeEnum<T extends Enum<T>>

java.lang.Object
org.cyclops.cyclopscore.command.argument.ArgumentTypeEnum<T>
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<T>

public class ArgumentTypeEnum<T extends Enum<T>> extends Object implements com.mojang.brigadier.arguments.ArgumentType<T>
An argument type for a certain enum.
  • Constructor Details

    • ArgumentTypeEnum

      public ArgumentTypeEnum(Class<T> enumClass)
  • Method Details

    • 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
    • getExamples

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

      public static <T extends Enum<T>> T getValue(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String name, Class<T> enumClass)