choice
Adds a string argument that must match one of the provided values.
Values must not contain whitespace — each value is parsed as a single word. If you need values with spaces, use string (accepts quoted strings) or greedyString (consumes remaining input) and validate in the executor.
Tab-completion suggests values in the order given. Invalid input is rejected on the server at execution time and fed back to the client as a command parsing error.
Implementation: wraps Paper's CustomArgumentType.Converted over Brigadier's StringArgumentType.word(). See Custom arguments.
See also
for retrieving the value
for quoted strings with spaces
for unconstrained trailing input
Returns the parsed value of a choice argument.
This will return the exact string token selected by the user. The value is guaranteed to be one of the allowed choices if the command handler is invoked.