feat: remove async check
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
106abc76e1
commit
5728c48f16
@ -98,13 +98,11 @@ export namespace event {
|
|||||||
if (eventCls.isAssignableFrom(event.getClass())) {
|
if (eventCls.isAssignableFrom(event.getClass())) {
|
||||||
let time = Date.now()
|
let time = Date.now()
|
||||||
exec(event);
|
exec(event);
|
||||||
if (event.isAsynchronous()) {
|
|
||||||
let cost = Date.now() - time;
|
let cost = Date.now() - time;
|
||||||
if (cost > 20) {
|
if (cost > 20) {
|
||||||
console.console(`§c注意! §6插件 §b${name} §6处理 §d${this.class2Name(eventCls)} §6事件 §c耗时 §4${cost}ms !`)
|
console.console(`§c注意! §6插件 §b${name} §6处理 §d${this.class2Name(eventCls)} §6事件 §c耗时 §4${cost}ms !`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
console.console(`§6插件 §b${name} §6处理 §d${this.class2Name(eventCls)} §6事件时发生异常 §4${ex}`);
|
console.console(`§6插件 §b${name} §6处理 §d${this.class2Name(eventCls)} §6事件时发生异常 §4${ex}`);
|
||||||
console.ex(ex);
|
console.ex(ex);
|
||||||
|
Loading…
Reference in New Issue
Block a user