register

abstract fun register(command: LiteralCommandNode<McBrigadierSource>, description: String?, aliases: Collection<String>)

Registers a brigadier command.

Parameters

command

The command to register.

description

The command description shown in help output, or null for none. Ignored on platforms without a description.

aliases

Aliases for the command.

Throws

If a command with the same literal or alias was already registered.


open fun register(command: LiteralCommandNode<McBrigadierSource>)

Registers a brigadier command.

Parameters

command

The command to register.


open fun register(command: LiteralCommandNode<McBrigadierSource>, description: String?)

Registers a brigadier command.

Parameters

command

The command to register.

description

The command description shown in help output, or null for none.


open fun register(command: LiteralCommandNode<McBrigadierSource>, aliases: Collection<String>)

Registers a brigadier command.

Parameters

command

The command to register.

aliases

Aliases for the command.


open fun register(command: LiteralArgumentBuilder<McBrigadierSource>, description: String?, aliases: Collection<String>)

Registers a brigadier command.

Parameters

command

The command builder to build and register.

description

The command description shown in help output, or null for none.

aliases

Aliases for the command.


open fun register(command: LiteralArgumentBuilder<McBrigadierSource>)

Registers a brigadier command.

Parameters

command

The command builder to build and register.


open fun register(command: LiteralArgumentBuilder<McBrigadierSource>, description: String?)

Registers a brigadier command.

Parameters

command

The command builder to build and register.

description

The command description shown in help output, or null for none.


open fun register(command: LiteralArgumentBuilder<McBrigadierSource>, aliases: Collection<String>)

Registers a brigadier command.

Parameters

command

The command builder to build and register.

aliases

Aliases for the command.