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) {