feat: console执行异常只打印一次
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
d850c4a16f
commit
a164f08e1e
@ -41,9 +41,11 @@ export namespace command {
|
|||||||
try {
|
try {
|
||||||
return executor(sender, command, Java.from(args));
|
return executor(sender, command, Java.from(args));
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
console.i18n("ms.api.command.execute.error", { sender: sender.name, plugin: plugin.description.name, command, args: Java.from(args).join(' '), ex })
|
console.i18n("ms.api.command.execute.error", { player: sender.name, plugin: plugin.description.name, command, args: Java.from(args).join(' '), ex })
|
||||||
console.ex(ex);
|
console.ex(ex);
|
||||||
console.sender(sender, [i18n.translate("ms.api.command.execute.error", { sender: sender.name, plugin: plugin.description.name, command, args: Java.from(args).join(' '), ex }), ...console.stack(ex)])
|
if (sender.name != 'CONSOLE') {
|
||||||
|
console.sender(sender, [i18n.translate("ms.api.command.execute.error", { player: sender.name, plugin: plugin.description.name, command, args: Java.from(args).join(' '), ex }), ...console.stack(ex)])
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user