feat: use inversify autoProvide inject

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-02-26 10:15:33 +08:00
parent 7e4c44eadd
commit 3143851969
26 changed files with 128 additions and 153 deletions

View File

@ -1,5 +1,5 @@
import { event, plugin } from '@ms/api'
import { injectable, inject, postConstruct } from '@ms/container'
import { event } from '@ms/api'
import { provideSingleton, postConstruct } from '@ms/container'
import * as reflect from '@ms/common/dist/reflect'
const Bungee: net.md_5.bungee.api.ProxyServer = base.getInstance().getProxy();
@ -21,10 +21,8 @@ EventPriority[event.EventPriority.HIGHEST] = Byte.valueOf(64);
/**
* Bungee Event Impl
*/
@injectable()
@provideSingleton(event.Event)
export class BungeeEvent extends event.Event {
@inject(plugin.PluginInstance)
private pluginInstance: any;
private pluginManager = Bungee.getPluginManager()
// EventBus