Command

interface Command

Represents a command within Housing.

Provides accessors and mutators for all command settings, and its associated action container.

Implementations perform sequential behavior and therefore expose suspend functions for better interaction with Housing.

Types

Link copied to clipboard

The mode in which a command is executed: either on the sender itself or on a target provided via command argument.

Properties

Link copied to clipboard
abstract var name: String

The unique name of this command, omitting the slash.

Functions

Link copied to clipboard
abstract suspend fun delete()

Deletes this command.

Link copied to clipboard
abstract suspend fun getActionContainer(): ActionContainer

Returns the action container associated with this command.

Link copied to clipboard
abstract suspend fun getCommandMode(): Command.CommandMode

Gets the targeting mode that this command runs with.

Link copied to clipboard
abstract suspend fun getListed(): Boolean

Fetches whether the command will be listed in command listings/tab complete.

Link copied to clipboard
open suspend fun getName(): String

Gets the current name of this command.

Link copied to clipboard
abstract suspend fun getRequiredGroupPriority(): Int

Retrieves the group priority required to execute this command.

Link copied to clipboard
abstract suspend fun setCommandMode(newCommandMode: Command.CommandMode): Command

Sets the targeting mode that this command will run with.

Link copied to clipboard
abstract suspend fun setListed(newListed: Boolean): Command

Controls whether this command appears in command listings/tab complete.

Link copied to clipboard
abstract suspend fun setName(newName: String): Command

Sets the name of this command.

Link copied to clipboard
abstract suspend fun setRequiredGroupPriority(newPriority: Int): Command

Sets the minimum group priority required to execute this command.