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
-
Field Summary
Fields inherited from class net.minestom.server.command.builder.arguments.Argument
allowSpace, suggestionType, useRemaining
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionentries()
parse
(@NotNull CommandSender sender, @NotNull String input) Parses the given input, and throw anArgumentSyntaxException
if the input cannot be converted toT
parser()
setFormat
(@NotNull ArgumentEnum.Format format) toString()
Methods inherited from class net.minestom.server.command.builder.arguments.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
@NotNull public E parse(@NotNull @NotNull CommandSender sender, @NotNull @NotNull String input) throws ArgumentSyntaxException Description copied from class:Argument
Parses the given input, and throw anArgumentSyntaxException
if the input cannot be converted toT
- Specified by:
parse
in classArgument<E extends Enum>
- Parameters:
input
- the argument to parse- Returns:
- the parsed argument
- Throws:
ArgumentSyntaxException
- ifvalue
is not valid
-
parser
-
entries
-
toString
-