style: format code

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2019-02-26 09:43:54 +00:00
parent ee4072526b
commit 72ae1b4b29
3 changed files with 17 additions and 15 deletions

View File

@ -159,7 +159,7 @@ module.exports = {
disable: function(jsp) {
var eventCache = EventHandler.listenerMap[jsp.description.name];
if (eventCache) {
eventCache.forEach(function (t) t.off.call(EventHandler));
eventCache.forEach(function(t) { t.off.call(EventHandler) });
delete EventHandler.listenerMap[jsp.description.name];
}
}

View File

@ -273,13 +273,15 @@ function disable() {
});
}
function reload() {
checkAndGet(arguments).forEach(function (p) {
function reloadPlugin(p) {
disable(p);
p = loadPlugin(p.__FILE__);
load(p);
enable(p);
});
}
function reload() {
checkAndGet(arguments).forEach(reloadPlugin);
}
// noinspection JSUnresolvedVariable

View File

@ -9,7 +9,7 @@ var Bukkit = MServer;
/**
* 获取NMS版本
*/
var nmsVersion = Bukkit.class.name.split('.')[3];
var nmsVersion = Bukkit.server.class.name.split('.')[3];
/**
* 获取NMS类
*/