feat: 优化JS插件权限和命令模块

This commit is contained in:
coding
2017-10-17 02:54:16 +00:00
parent 5b621d3d99
commit 2788a9a8aa
4 changed files with 72 additions and 35 deletions

View File

@ -12,7 +12,7 @@ var PluginCommand = Java.type('org.bukkit.command.PluginCommand');
var Arrays = Java.type('java.util.Arrays')
function init(jsp){
function enable(jsp){
var commands = jsp.description.commands;
if(commands){
var pluginCmds = [];
@ -66,7 +66,8 @@ function on(jsp, name, exec) {
}
}
exports.init = init
exports.enable = enable
exports.on = on;
exports.off = function () {