requires

infix fun requires(predicate: (CommandSourceStack) -> Boolean): CommandCreator<T>

Sets a requirement predicate for this command.

The command or subcommand will only be available and executable if the predicate returns true for the given CommandSourceStack.

Return

this CommandCreator instance for chaining

Parameters

predicate

a function that takes a CommandSourceStack and returns a Boolean