mirror of
https://e.coding.net/circlecloud/YumCore.git
synced 2024-11-21 01:38:51 +00:00
fix: 命令异常直接抛出
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
8b90dce242
commit
644f661001
@ -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
|
||||
*/
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user