AbstractCommand

abstract class AbstractCommand @JvmOverloads constructor(    val owner: CommandOwner,     val primaryName: String,     val secondaryNames: Array<out String>,     val description: String = "<no description available>",     parentPermission: Permission = owner.parentPermission) : Command

Command 的基础实现

See also

Inheritors

Constructors

Link copied to clipboard
constructor(    owner: CommandOwner,     primaryName: String,     secondaryNames: Array<out String>,     description: String = "<no description available>",     parentPermission: Permission = owner.parentPermission)

Functions

Link copied to clipboard
inline suspend fun Command.execute(    sender: CommandSender,     vararg arguments: Message = emptyArray(),     checkPermission: Boolean = true): CommandExecuteResult
inline suspend fun Command.execute(sender: CommandSender, arguments: String = "", checkPermission: Boolean = true): CommandExecuteResult

执行一个确切的指令

Link copied to clipboard
Link copied to clipboard
inline fun Command.register(override: Boolean = false): Boolean
Link copied to clipboard
inline fun Command.unregister(): Boolean

Properties

Link copied to clipboard

获取所有指令名称 (包含 primaryNamesecondaryNames).

Link copied to clipboard
open override val description: String

描述, 用于显示在 BuiltInCommands.HelpCommand

Link copied to clipboard
Link copied to clipboard

指令可能的参数列表.

Link copied to clipboard
override val owner: CommandOwner

指令拥有者.

Link copied to clipboard
open override val permission: Permission

为此指令分配的权限.

Link copied to clipboard

true 时表示 指令前缀 可选.

Link copied to clipboard
override val primaryName: String

主指令名. 将会参与构成 Permission.id.

Link copied to clipboard
override val secondaryNames: Array<out String>

次要指令名

Link copied to clipboard
open override val usage: String

用法说明, 用于发送给用户. usage 一般包含 description.