From 83ea7a6c3e79edd10f093cfe337f7a3d38378c5d Mon Sep 17 00:00:00 2001 From: j502647092 Date: Fri, 14 Aug 2015 13:54:58 +0800 Subject: [PATCH] add return while ConsoleCommand check... --- src/cn/citycraft/SimpleEssential/SimpleEssential.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cn/citycraft/SimpleEssential/SimpleEssential.java b/src/cn/citycraft/SimpleEssential/SimpleEssential.java index 0cfb442..4d31768 100644 --- a/src/cn/citycraft/SimpleEssential/SimpleEssential.java +++ b/src/cn/citycraft/SimpleEssential/SimpleEssential.java @@ -50,8 +50,10 @@ public class SimpleEssential extends JavaPlugin { if (!command.hasPermission(sender)) { sender.sendMessage(ChatColor.RED + "你没有此命令的权限."); return true; - }else if(command.isOnlyPlayerExecutable() && !(sender instanceof Player)){ + } + if (command.isOnlyPlayerExecutable() && !(sender instanceof Player)) { sender.sendMessage(ChatColor.RED + "此命令只能由玩家执行."); + return true; } if (args.length >= command.getMinimumArguments()) { try {