feat: remove async check

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2020-02-26 10:43:47 +08:00
parent e8d5d10d44
commit 2320736a92

View File

@ -98,11 +98,9 @@ export namespace event {
if (eventCls.isAssignableFrom(event.getClass())) {
let time = Date.now()
exec(event);
if (event.isAsynchronous()) {
let cost = Date.now() - time;
if (cost > 20) {
console.console(`§c注意! §6插件 §b${name} §6处理 §d${this.class2Name(eventCls)} §6事件 §c耗时 §4${cost}ms !`)
}
let cost = Date.now() - time;
if (cost > 20) {
console.console(`§c注意! §6插件 §b${name} §6处理 §d${this.class2Name(eventCls)} §6事件 §c耗时 §4${cost}ms !`)
}
}
} catch (ex) {