feat: add bungee package

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-01-15 16:43:00 +08:00
parent 1425c473fd
commit aa581afbe5
8 changed files with 244 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import { server } from '@ms/api'
import { injectable } from '@ms/container';
let Bungee: net.md_5.bungee.api.ProxyServer = base.getInstance().getProxy();
@injectable()
export class BungeeServer implements server.Server {
getPlayer(name: string) {
return Bungee.getPlayer(name);
}
getVersion(): string {
return Bungee.getVersion()
}
getOnlinePlayers() {
return Bungee.getPlayers()
}
getConsoleSender() {
return Bungee.getConsole()
}
getService(service: string) {
throw new Error("Method not implemented.");
}
dispatchCommand(sender: string | any, command: string): boolean {
return false
}
dispatchConsoleCommand(command: string): boolean {
return false
}
sendJson(sender: string | any, json: string): void {
throw new Error("Method not implemented.");
}
}