feat: add spring support

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-05-26 15:53:41 +08:00
parent 58478116c6
commit 72bd6b4c9c
15 changed files with 333 additions and 40 deletions

View File

@ -140,7 +140,7 @@ export class MiaoScriptConsole implements Console {
if (trace.className.startsWith('<')) {
let { fileName, lineNumber } = this.readSourceMap(trace.fileName, trace.lineNumber)
if (fileName.startsWith(root)) { fileName = fileName.split(root)[1] }
cache.push(` §e->§c ${fileName} => §4${trace.methodName}:${lineNumber}`)
cache.push(` §e->§c ${fileName}:${lineNumber} => §4${trace.methodName}`)
} else {
let className = trace.className;
var fileName = trace.fileName as string;

View File

@ -11,6 +11,7 @@ export namespace constants {
Bukkit = 'bukkit',
Sponge = 'sponge',
Nukkit = 'nukkit',
Bungee = 'bungee'
Bungee = 'bungee',
Spring = 'spring'
}
}

View File

@ -33,5 +33,6 @@ export namespace server {
getNettyPipeline(): any;
getRootLogger(): any;
sendJson(sender: string | any, json: object | string): void;
tabComplete?(sender: string | any, input: string, index?: number);
}
}