ColosseumBaseCommand

Base command class for Colosseum commands. This class serves as the root command that can contain multiple sub-commands.

Parameters

plugin

The Colosseum plugin instance.

name

The name of the base command.

subCommands

A list of sub-commands under this base command.

Constructors

Link copied to clipboard
constructor(plugin: ColosseumPlugin, name: String, subCommands: List<ColosseumCommand>)

Properties

Link copied to clipboard

The command metadata for this Colosseum command.

Link copied to clipboard

The name of the nested command.

Link copied to clipboard

The ColosseumPlugin instance.

Link copied to clipboard

The list of sub-commands under this nested command.

Functions

Link copied to clipboard

Constructs the command descriptor for the nested command using the class's name. This includes setting up the arguments to handle sub-commands and any additional arguments.

Link copied to clipboard
open fun execute(ctx: ColosseumCommand.CommandContext<CommandSender>): Unit?

Executes the command.

Link copied to clipboard
open fun executeCommandBlock(ctx: ColosseumCommand.CommandContext<BlockCommandSender>)

Executes the command for a command block sender.

Link copied to clipboard
open fun executeConsole(ctx: ColosseumCommand.CommandContext<ConsoleCommandSender>)

Executes the command for a console sender.

Link copied to clipboard

Executes the command for a player sender.

Link copied to clipboard

Generates the command format string for display.

Link copied to clipboard
override fun onCommand(sender: CommandSender, command: Command, label: String, args: Array<out String>): Boolean

Handles the execution of the nested command by delegating to the appropriate sub-command.

Link copied to clipboard
override fun onTabComplete(sender: CommandSender, command: Command, label: String, args: Array<out String>): List<String>?

Handles tab completion for the nested command by delegating to the appropriate sub-command.