From 59916627644466dd00c895280a2776ba85e76f0d Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Fri, 3 Apr 2020 13:32:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20console=E6=89=A7=E8=A1=8C=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E5=8F=AA=E6=89=93=E5=8D=B0=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: MiaoWoo --- packages/api/src/command.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/api/src/command.ts b/packages/api/src/command.ts index 1eea473b..ff399afb 100644 --- a/packages/api/src/command.ts +++ b/packages/api/src/command.ts @@ -41,9 +41,11 @@ export namespace command { try { return executor(sender, command, Java.from(args)); } 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.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; } }