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

AbstractCommand

abstract class AbstractCommand : Command

Normal command interface.

Constructors

<init>

AbstractCommand(displayName: String, permissions: Permissions, alias: String, description: String, exampleUsage: String = "")
AbstractCommand(displayName: String, permissions: Permissions, aliases: Array<String>, description: String, usage: String = "", exampleUsage: String = "")

Normal command interface.

Properties

aliases

open val aliases: Array<String>

the command's aliases

description

open val description: String

the command's description

displayName

open val displayName: String

name for command in help messages

exampleUsage

open val exampleUsage: String

the command's example usage

permissions

open val permissions: Permissions

the command's Permissions

subCommandAssociations

val subCommandAssociations: MutableMap<String, Command>

The commands sub-commands.

usage

open val usage: String

The usage of the command.

Inherited Properties

name

open val name: String

The first alias of the command.

Functions

registerSubCommand

open fun registerSubCommand(subCommand: SubCommand): Unit

Registers the subCommand.

Inherited Functions

hasSubCommands

open fun hasSubCommands(): Boolean

process

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

The main method of the command.

registerSubCommands

open fun registerSubCommands(vararg subCommands: SubCommand): Unit

Registers the subCommandAssociations.

Inheritors

SubCommand

abstract class SubCommand : AbstractCommand

Representation of a sub-command.