[]
        
(Showing Draft Content)

命令日志

插件命令也可以和其他内置命令一样输出日志,方便命令逻辑的调试。

JavaScript 代码如下,log方法可以输出自定义日志。

class MyPluginCommand extends Forguncy.Plugin.CommandBase{
    execute() {
        let text = this.CommandParam.MyProperty; 

        this.log("这里是命令日志,MyProperty属性值:" + text)

        alert(text);
    }
}

Forguncy.Plugin.CommandFactory.registerCommand("MyPlugin.MyPluginCommand, MyPlugin", MyPluginCommand);

效果: