diff --git a/src/main/resources/api/command.js b/src/main/resources/api/command.js index 1bf0396..d242a84 100644 --- a/src/main/resources/api/command.js +++ b/src/main/resources/api/command.js @@ -1,2 +1,2 @@ /*global Java, base, module, exports, require*/ -module.exports = require('./mserver').command; \ No newline at end of file +module.exports = require('./msp.js').command; \ No newline at end of file diff --git a/src/main/resources/api/event.js b/src/main/resources/api/event.js index 585de74..37ac009 100644 --- a/src/main/resources/api/event.js +++ b/src/main/resources/api/event.js @@ -1,2 +1,2 @@ /*global Java, base, module, exports, require*/ -module.exports = require('./mserver').event; \ No newline at end of file +module.exports = require('./msp.js').event; \ No newline at end of file diff --git a/src/main/resources/api/item.js b/src/main/resources/api/item.js index c2fdbac..d405417 100644 --- a/src/main/resources/api/item.js +++ b/src/main/resources/api/item.js @@ -1,2 +1,2 @@ /*global Java, base, module, exports, require*/ -module.exports = require('./mserver').item; \ No newline at end of file +module.exports = require('./msp.js').item; \ No newline at end of file diff --git a/src/main/resources/api/mserver.js b/src/main/resources/api/msp.js similarity index 85% rename from src/main/resources/api/mserver.js rename to src/main/resources/api/msp.js index 6674433..5038439 100644 --- a/src/main/resources/api/mserver.js +++ b/src/main/resources/api/msp.js @@ -9,5 +9,6 @@ module.exports = { permission: impl('permission'), server: impl('server'), task: impl('task'), - item: impl('item') + item: impl('item'), + player: impl('player') }; \ No newline at end of file diff --git a/src/main/resources/api/permission.js b/src/main/resources/api/permission.js index 107faaa..0ade738 100644 --- a/src/main/resources/api/permission.js +++ b/src/main/resources/api/permission.js @@ -1,2 +1,2 @@ /*global Java, base, module, exports, require*/ -module.exports = require('./mserver').permission; \ No newline at end of file +module.exports = require('./msp.js').permission; \ No newline at end of file diff --git a/src/main/resources/api/player.js b/src/main/resources/api/player.js new file mode 100644 index 0000000..eec4798 --- /dev/null +++ b/src/main/resources/api/player.js @@ -0,0 +1,2 @@ +/*global Java, base, module, exports, require*/ +module.exports = require('./msp.js').player; \ No newline at end of file diff --git a/src/main/resources/api/plugin.js b/src/main/resources/api/plugin.js index ecb9f42..53393bd 100644 --- a/src/main/resources/api/plugin.js +++ b/src/main/resources/api/plugin.js @@ -143,8 +143,8 @@ function initPlugin(file, plugin) { // 初始化插件配置相关方法 initPluginConfig(plugin); - command.enable(plugin); - permission.enable(plugin); + if (command.enable) command.enable(plugin); + if (permission.enable) permission.enable(plugin); } /** diff --git a/src/main/resources/api/server.js b/src/main/resources/api/server.js index 8f09fea..f673ba3 100644 --- a/src/main/resources/api/server.js +++ b/src/main/resources/api/server.js @@ -1,2 +1,2 @@ /*global Java, base, module, exports, require*/ -module.exports = require('./mserver').server; \ No newline at end of file +module.exports = require('./msp.js').server; \ No newline at end of file diff --git a/src/main/resources/api/task.js b/src/main/resources/api/task.js index 6ab9212..91a0929 100644 --- a/src/main/resources/api/task.js +++ b/src/main/resources/api/task.js @@ -1,2 +1,2 @@ /*global Java, base, module, exports, require*/ -module.exports = require('./mserver').task; \ No newline at end of file +module.exports = require('./msp.js').task; \ No newline at end of file