@ -3,13 +3,15 @@
|
||||
import { server } from '@ccms/api'
|
||||
import { Container } from '@ccms/container'
|
||||
|
||||
import { BungeeConsole } from './console';
|
||||
import './event';
|
||||
import './server';
|
||||
import './command';
|
||||
import './channel';
|
||||
import './task';
|
||||
import { BungeeConsole } from './console'
|
||||
import './task'
|
||||
import './event'
|
||||
import './server'
|
||||
import { BungeeNativePluginManager } from './plugin'
|
||||
import './command'
|
||||
import './channel'
|
||||
|
||||
export default function BungeeImpl(container: Container) {
|
||||
container.bind(server.Console).toConstantValue(BungeeConsole);
|
||||
container.bind(server.Console).toConstantValue(BungeeConsole)
|
||||
container.rebind(server.NativePluginManager).toConstantValue(new BungeeNativePluginManager())
|
||||
}
|
||||
|
12
packages/bungee/src/plugin.ts
Normal file
12
packages/bungee/src/plugin.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { server } from '@ccms/api'
|
||||
|
||||
let Bungee: net.md_5.bungee.api.ProxyServer = base.getInstance().getProxy()
|
||||
|
||||
export class BungeeNativePluginManager extends server.NativePluginManager {
|
||||
has(name: string) {
|
||||
return !!this.get(name)
|
||||
}
|
||||
get(name: string) {
|
||||
return Bungee.getPluginManager().getPlugin(name)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user