feat: optimize plugin event registry

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-07-28 09:41:10 +08:00
parent 3c1ff6ea41
commit a3cf4fa476
3 changed files with 3 additions and 4 deletions

View File

@ -20,7 +20,7 @@ export class PluginEventManager {
// ignore space listener
if (!this.ServerChecker.check(event.servers)) { continue }
// here must bind this to pluginInstance
this.EventManager.listen(pluginInstance, event.name, pluginInstance[event.executor].bind(pluginInstance))
this.EventManager.listen(pluginInstance, event.name, pluginInstance[event.executor].bind(pluginInstance), event.priority, event.ignoreCancel)
}
}