feat: add server interface
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
8e94683757
commit
364463dc6a
@ -22,8 +22,8 @@
|
|||||||
"test": "echo \"Error: run tests from root\" && exit 1"
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ms/common": "^0.1.0",
|
"@ms/container": "^0.1.0",
|
||||||
"@ms/container": "^0.1.0"
|
"@ms/ployfill": "^0.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
let Arrays = Java.type('java.util.Arrays');
|
let Arrays = Java.type('java.util.Arrays');
|
||||||
let Level = Java.type('java.util.logging.Level');
|
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 {
|
export class MiaoScriptConsole implements Console {
|
||||||
Console: NodeJS.ConsoleConstructor;
|
Console: NodeJS.ConsoleConstructor;
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
export namespace server {
|
export namespace server {
|
||||||
export const ServerType = Symbol("ServerType");
|
export const ServerType = Symbol("ServerType");
|
||||||
export const Console = Symbol("Console");
|
export const Console = Symbol("Console");
|
||||||
|
export const Server = Symbol("Server");
|
||||||
|
export interface Server {
|
||||||
|
getVersion(): string;
|
||||||
|
getPlayer(name: string): any;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user