execute

fun <S> ArgumentBuilder<S, *>.execute(command: CommandAction<S>)

Sets the action the command will take when executed.

If the command does not throw an exception, it succeeds with Command.SINGLE_SUCCESS.

To indicate possible failure more explicitly or specify the resulting value, use executeWithResult and return a CommandResult from command.

Author

Cypher121

See also

com.mojang.brigadier.builder.ArgumentBuilder