CommandManager

interface CommandManager

The command manager is responsible for registering, unregistering, and keeping track of commands.

Functions

Link copied to clipboard
abstract fun dispatch(sender: Sender, command: String): Boolean

Dispatches a command from the given sender with the given command as the input.

Link copied to clipboard
abstract fun register(command: BrigadierCommand, meta: CommandMeta)

Registers the given Brigadier command with the given meta to this manager.

abstract fun register(command: InvocableCommand<*>, meta: CommandMeta)

Registers the given invocable command with the given meta to this manager.

Link copied to clipboard
abstract fun unregister(alias: String)

Unregisters the given alias from this manager, if registered.

Link copied to clipboard
abstract fun updateCommands(player: Player)

Updates the list of known commands for the given player.