optionVararg

abstract fun optionVararg(declaredName: String, amount: Int, requiredAmount: Int, optionNameSupplier: (Int) -> String, block: TextCommandOptionBuilder.(Int) -> Unit = {})(source)

Declares multiple input options in a single parameter.

The parameter's type needs to be a List, where the element type is supported by ParameterResolver.

Additional types can be added by implementing TextParameterResolver.

Note: You are limited to one vararg parameter in text commands.

Parameters

declaredName

Name of the declared parameter which receives the value of the combined options

amount

How many options to generate

requiredAmount

How many of the generated options are required

optionNameSupplier

Block generating an option name from the option's index

See also