Class: CustomCommandRegistry
Beta
提供注册自定义命令的功能。
Provides the functionality for registering custom commands.
Methods
registerCommand()
registerCommand(
customCommand,callback):void
World Mutation Early Execution Beta
Parameters
customCommand
callback
(origin, ...args) => CustomCommandResult | undefined
命令执行时触发的回调。
The callback triggered when the command executes.
Returns
void
Remarks
注册一个自定义命令,该命令在执行时触发脚本回调。
Registers a custom command that when executed triggers a script callback.
Throws
This function can throw errors.
registerEnum()
registerEnum(
name,values):void
World Mutation Early Execution Beta
Parameters
name
string
values
string[]
Returns
void
Remarks
注册一个自定义命令枚举。
Registers a custom command enum.
Throws
This function can throw errors.
