feat: add server interface

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2019-11-04 20:18:30 +08:00
parent eea2a225e8
commit 40d020ef67
3 changed files with 8 additions and 3 deletions

View File

@ -22,8 +22,8 @@
"test": "echo \"Error: run tests from root\" && exit 1"
},
"dependencies": {
"@ms/common": "^0.1.0",
"@ms/container": "^0.1.0"
"@ms/container": "^0.1.0",
"@ms/ployfill": "^0.1.0"
},
"devDependencies": {
"reflect-metadata": "^0.1.13",

View File

@ -1,6 +1,6 @@
let Arrays = Java.type('java.util.Arrays');
let Level = Java.type('java.util.logging.Level');
let ignoreLogPrefix = ['java.', 'net.minecraft.', 'org.bukkit.', 'jdk.nashorn.'];
let ignoreLogPrefix = ['java.', 'net.minecraft.', 'org.bukkit.', 'jdk.nashorn.', 'io.netty.'];
export class MiaoScriptConsole implements Console {
Console: NodeJS.ConsoleConstructor;

View File

@ -1,4 +1,9 @@
export namespace server {
export const ServerType = Symbol("ServerType");
export const Console = Symbol("Console");
export const Server = Symbol("Server");
export interface Server {
getVersion(): string;
getPlayer(name: string): any;
}
}