subcommand

fun subcommand(name: String, creator: CommandCreator<LiteralArgumentBuilder<CommandSourceStack>>.() -> Unit = {}): CommandCreator<T>

Adds a subcommand to this command.

This is an alias for literal to improve readability in complex command trees.

Return

this CommandCreator instance for chaining

Parameters

name

the name of the subcommand

creator

the configuration block for the subcommand