common / me.schlaubi.regnumutils.command.spi / Command

Command

interface Command

Command interface.

Properties

aliases

abstract val aliases: Array<String>

All aliases of this command.

description

abstract val description: String

The description of the command.

displayName

abstract val displayName: String

The display name of the command in help messages.

exampleUsage

abstract val exampleUsage: String

An example of how to use the command.

name

open val name: String

The first alias of the command.

permissions

abstract val permissions: Permissions

The Permissionss that are needed to execute that command.

subCommandAssociations

abstract val subCommandAssociations: Map<String, Command>

The commands sub-commands.

usage

abstract val usage: String

The usage of the command.

Functions

hasSubCommands

open fun hasSubCommands(): Boolean

process

abstract fun process(args: Arguments, context: Context): Unit

The main method of the command.

registerSubCommand

abstract fun registerSubCommand(subCommand: SubCommand): Unit

Registers the subCommand.

registerSubCommands

open fun registerSubCommands(vararg subCommands: SubCommand): Unit

Registers the subCommandAssociations.

Inheritors

AbstractCommand

abstract class AbstractCommand : Command

Normal command interface.