From 644f66100177c88356d30f70feeca30f7886f0ab Mon Sep 17 00:00:00 2001 From: 502647092 Date: Sat, 4 Feb 2017 20:38:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=91=BD=E4=BB=A4=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E6=8A=9B=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- src/main/java/pw/yumc/YumCore/commands/CommandError.java | 3 +++ src/main/java/pw/yumc/YumCore/commands/info/CommandInfo.java | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/pw/yumc/YumCore/commands/CommandError.java b/src/main/java/pw/yumc/YumCore/commands/CommandError.java index 9faf593..4ec54dc 100644 --- a/src/main/java/pw/yumc/YumCore/commands/CommandError.java +++ b/src/main/java/pw/yumc/YumCore/commands/CommandError.java @@ -1,6 +1,7 @@ package pw.yumc.YumCore.commands; import org.bukkit.command.CommandSender; + import pw.yumc.YumCore.bukkit.Log; import pw.yumc.YumCore.commands.exception.ArgumentException; import pw.yumc.YumCore.commands.exception.CommandException; @@ -10,6 +11,8 @@ import pw.yumc.YumCore.commands.info.CommandInfo; import pw.yumc.YumCore.commands.interfaces.ErrorHanlder; /** + * 命令错误处理 + * * @author 喵♂呜 * @since 2016/11/27 0027 */ diff --git a/src/main/java/pw/yumc/YumCore/commands/info/CommandInfo.java b/src/main/java/pw/yumc/YumCore/commands/info/CommandInfo.java index 9004003..43df12c 100644 --- a/src/main/java/pw/yumc/YumCore/commands/info/CommandInfo.java +++ b/src/main/java/pw/yumc/YumCore/commands/info/CommandInfo.java @@ -19,7 +19,6 @@ import pw.yumc.YumCore.commands.annotation.Cmd.Executor; import pw.yumc.YumCore.commands.annotation.Help; import pw.yumc.YumCore.commands.annotation.Sort; import pw.yumc.YumCore.commands.exception.ArgumentException; -import pw.yumc.YumCore.commands.exception.CommandException; import pw.yumc.YumCore.commands.exception.ParseException; import pw.yumc.YumCore.commands.exception.PermissionException; import pw.yumc.YumCore.commands.exception.SenderException; @@ -133,7 +132,7 @@ public class CommandInfo { } catch (ParseException | ArgumentException e) { Log.sender(sender, argErr, e.getMessage()); } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - throw new CommandException(e); + throw new RuntimeException(e); } }; if (async) {