executes

infix fun executes(block: (CommandContext<CommandSourceStack>) -> Int): CommandCreator<T>

Sets the execution handler for this command.

This logic is executed when the command or subcommand is invoked.

Return

this CommandCreator instance for chaining

Parameters

block

the code to execute, taking a CommandContext and returning an integer result (usually 1 for success)