feat: use inversify autoProvide inject
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
@@ -4,17 +4,12 @@ import { server, command, event, channel, task } from '@ms/api'
|
||||
import { Container } from '@ms/container'
|
||||
|
||||
import { BungeeConsole } from './console';
|
||||
import { BungeeEvent } from './event';
|
||||
import { BungeeServer } from './server';
|
||||
import { BungeeCommand } from './command';
|
||||
import { BungeeChannel } from './channel';
|
||||
import { BungeeTaskManager } from './task';
|
||||
import './event';
|
||||
import './server';
|
||||
import './command';
|
||||
import './channel';
|
||||
import './task';
|
||||
|
||||
export default function BungeeImpl(container: Container) {
|
||||
container.bind(server.Console).toConstantValue(BungeeConsole);
|
||||
container.bind(event.Event).to(BungeeEvent).inSingletonScope();
|
||||
container.bind(server.Server).to(BungeeServer).inSingletonScope();
|
||||
container.bind(command.Command).to(BungeeCommand).inSingletonScope();
|
||||
container.bind(channel.Channel).to(BungeeChannel).inSingletonScope();
|
||||
container.bind(task.TaskManager).to(BungeeTaskManager).inSingletonScope();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user