feat: add download and getPluginsFolder

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-02-29 22:28:43 +08:00
parent ce431aded4
commit 488eecba07
6 changed files with 30 additions and 5 deletions

View File

@ -31,6 +31,9 @@ export class BukkitServer implements server.Server {
dispatchConsoleCommand(command: string): boolean {
return Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command)
}
getPluginsFolder(): string {
return Bukkit.getUpdateFolderFile().getParentFile().getCanonicalPath();
}
sendJson(sender: string | any, json: object | string): void {
if (typeof sender === "string") {
sender = this.getPlayer(sender)