Class ArgumentEnum<E extends Enum>
java.lang.Object
net.minestom.server.command.builder.arguments.Argument<E>
net.minestom.server.command.builder.arguments.ArgumentEnum<E>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class Argument
allowSpace, suggestionType, useRemaining -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionentries()parse(CommandSender sender, String input) Parses the given input, and throw anArgumentSyntaxExceptionif the input cannot be converted toTparser()setFormat(ArgumentEnum.Format format) toString()Methods inherited from class Argument
allowSpace, equals, filter, getCallback, getDefaultValue, getId, getSuggestionCallback, hasErrorCallback, hashCode, hasSuggestion, isOptional, map, map, nodeProperties, parse, setCallback, setDefaultValue, setDefaultValue, setDefaultValue, setSuggestionCallback, suggestionType, useRemaining
-
Field Details
-
NOT_ENUM_VALUE_ERROR
public static final int NOT_ENUM_VALUE_ERROR- See Also:
-
-
Constructor Details
-
ArgumentEnum
-
-
Method Details
-
setFormat
-
parse
Description copied from class:ArgumentParses the given input, and throw anArgumentSyntaxExceptionif the input cannot be converted toT- Specified by:
parsein classArgument<E extends Enum>- Parameters:
input- the argument to parse- Returns:
- the parsed argument
- Throws:
ArgumentSyntaxException- ifvalueis not valid
-
parser
-
entries
-
toString
-