feat: add NativePluginManager

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-03-01 15:19:43 +08:00
parent 488eecba07
commit 6b7a729e65
6 changed files with 50 additions and 4 deletions

View File

@ -5,6 +5,12 @@ let Bungee: net.md_5.bungee.api.ProxyServer = base.getInstance().getProxy();
@provideSingleton(server.Server)
export class BungeeServer implements server.Server {
private pluginsFolder: string;
constructor() {
this.pluginsFolder = Bungee.getPluginsFolder().getCanonicalPath();
}
getPlayer(name: string) {
return Bungee.getPlayer(name);
}
@ -30,7 +36,10 @@ export class BungeeServer implements server.Server {
return Bungee.getPluginManager().dispatchCommand(Bungee.getConsole(), command)
}
getPluginsFolder(): string {
return Bungee.getPluginsFolder().getCanonicalPath();
return this.pluginsFolder;
}
getNativePluginManager() {
throw new Error("Method not implemented.");
}
sendJson(sender: string | any, json: string): void {
throw new Error("Method not implemented.");