From 64b0b9992a52f2e5ef7f04c4d77c7f519e6bafe3 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Wed, 14 Sep 2016 01:53:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AD=90=E5=91=BD=E4=BB=A4=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E8=BF=94=E5=9B=9Etrue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- .../pw/yumc/YumCore/commands/CommandInfo.java | 3 +-- .../yumc/YumCore/commands/CommandManager.java | 18 +++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main/java/pw/yumc/YumCore/commands/CommandInfo.java b/src/main/java/pw/yumc/YumCore/commands/CommandInfo.java index ba42664..cdab42e 100644 --- a/src/main/java/pw/yumc/YumCore/commands/CommandInfo.java +++ b/src/main/java/pw/yumc/YumCore/commands/CommandInfo.java @@ -125,9 +125,8 @@ public class CommandInfo { } else { runnable.run(); } - return true; } - return false; + return true; } /** diff --git a/src/main/java/pw/yumc/YumCore/commands/CommandManager.java b/src/main/java/pw/yumc/YumCore/commands/CommandManager.java index fe0f6a1..c199d52 100644 --- a/src/main/java/pw/yumc/YumCore/commands/CommandManager.java +++ b/src/main/java/pw/yumc/YumCore/commands/CommandManager.java @@ -34,35 +34,35 @@ public class CommandManager implements TabExecutor { /** * 插件实例类 */ - JavaPlugin plugin = P.instance; + private final JavaPlugin plugin = P.instance; /** * 默认命令 */ - CommandInfo defCmd = null; + private CommandInfo defCmd = null; /** * 命令列表 */ - Set cmds = new HashSet<>(); + private final Set cmds = new HashSet<>(); /** * Tab列表 */ - Set tabs = new HashSet<>(); + private final Set tabs = new HashSet<>(); /** * 命令缓存列表 */ - Map cmdCache = new HashMap<>(); + private final Map cmdCache = new HashMap<>(); /** * 命令名称缓存 */ - List cmdNameCache = new ArrayList<>(); + private final List cmdNameCache = new ArrayList<>(); /** * 命令帮助 */ - CommandHelp help; + private CommandHelp help; /** * 插件命令 */ - PluginCommand cmd; + private final PluginCommand cmd; /** * 命令管理器 @@ -149,7 +149,7 @@ public class CommandManager implements TabExecutor { /** * 设置帮助解析器 - * + * * @param helpParse * 帮助解析器 */