choice
fun VelocityLiteralNode.choice(name: String, values: Iterable<String>, block: VelocityArgumentNode<String>.() -> Unit)
Adds a string "choice" argument to this command.
The argument only accepts one of the provided values and will suggest them for tab-completion.
Since Velocity has no custom argument type adapter, this uses a native StringArgumentType.word() with server-side suggestions. The client sees a generic string argument. Invalid values are rejected when VelocityContext.choice is called during command execution.
See also
Returns the parsed value of a choice argument.
Parameters
allowed
the set of valid choices; must match the values passed to choice at registration.
See also
Throws
CommandSyntaxException
if the input is not in allowed