feat: print stack on game
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
8d5902600f
commit
2dff086a01
@ -123,8 +123,9 @@ function main(sender, command, args){
|
||||
var pname = args[1];
|
||||
if (pluginCache.indexOf(pname) !== -1) {
|
||||
manager.reload(pname)
|
||||
console.sender(sender, '§6插件 §b%s §a重载完成!'.format(pname))
|
||||
} else {
|
||||
console.sender(sender, '§c插件 %s 不存在!'.format(pname))
|
||||
console.sender(sender, '§c插件 §b%s §c不存在!'.format(pname))
|
||||
}
|
||||
} else {
|
||||
self.reloadConfig();
|
||||
@ -133,17 +134,24 @@ function main(sender, command, args){
|
||||
break;
|
||||
case "restart":
|
||||
try {
|
||||
console.sender(sender, '§6Reloading §3MiaoScript Engine...');
|
||||
ScriptEngineContextHolder.disableEngine();
|
||||
ScriptEngineContextHolder.enableEngine();
|
||||
console.sender(sender, '§3MiaoScript Engine §6Reload §aSuccessful...');
|
||||
} catch (ex) {
|
||||
console.sender(sender, "§3MiaoScript Engine §6Reload §cError! ERR: " + ex);
|
||||
console.ex(ex);
|
||||
console.sender(sender, console.stack(ex));
|
||||
}
|
||||
break;
|
||||
case "run":
|
||||
args.shift(1);
|
||||
console.sender(sender, eval(args.join(' ')) || '§4没有返回结果!');
|
||||
try {
|
||||
var script = args.join(' ')
|
||||
console.sender(sender, '§b运行脚本:§r', script)
|
||||
console.sender(sender, '§a返回结果:§r', eval(script) || '§4没有返回结果!');
|
||||
} catch (ex) {
|
||||
console.sender(sender, console.stack(ex))
|
||||
}
|
||||
break;
|
||||
case "create":
|
||||
var name = args[1];
|
||||
|
Loading…
Reference in New Issue
Block a user