Class EnumArgument<S extends CommandSource>

All Implemented Interfaces:
Prioritizable

public final class EnumArgument<S extends CommandSource> extends ArgumentType<S,Enum<?>>
  • Constructor Details

    • EnumArgument

      public EnumArgument(TypeWrap<Enum<?>> typeWrap)
  • Method Details

    • parse

      public Enum<?> parse(@NotNull @NotNull CommandContext<S> context, @NotNull @NotNull Argument<S> argument, @NotNull @NotNull String input) throws ResponseException
      Description copied from class: ArgumentType
      Parses the argument value from the given input string, using the provided execution context. This method is responsible for converting the raw input into the appropriate type, handling any necessary validation or error handling during the parsing process.
      Specified by:
      parse in class ArgumentType<S extends CommandSource,Enum<?>>
      Parameters:
      context - the execution context.
      argument - the argument with this type.
      input - the raw input string to parse.
      Returns:
      the resolved value of type T.
      Throws:
      ResponseException