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
Link copied to clipboard
suspend fun CommandSender.handle()
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 context: CommandArgumentContext

指令参数环境. 默认为 CommandArgumentContext.Builtins + overrideContext

Link copied to clipboard
abstract val description: String

描述, 用于显示在 BuiltInCommands.HelpCommand

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val owner: CommandOwner

指令拥有者.

Link copied to clipboard
abstract val permission: Permission

为此指令分配的权限.

Link copied to clipboard

true 时表示 指令前缀 可选.

Link copied to clipboard
abstract val primaryName: String

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

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

次要指令名

Link copied to clipboard
open override val usage: String

自动根据带有 Handler 注解的函数签名生成 usage. 也可以被覆盖.