From 88ce5eaad6ee228cdc9d21c79bd6853a8e692a60 Mon Sep 17 00:00:00 2001 From: slinar Date: Fri, 12 Apr 2019 14:15:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/me/commandBlock/CheckCommand.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/me/commandBlock/CheckCommand.java b/src/me/commandBlock/CheckCommand.java index 16e4a4c..fb3c84e 100644 --- a/src/me/commandBlock/CheckCommand.java +++ b/src/me/commandBlock/CheckCommand.java @@ -5,9 +5,8 @@ import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; -import org.bukkit.Bukkit; - public final class CheckCommand { + private static CommandBlock ins = CommandBlock.getIns(); /** * 根据配置文件检查玩家输入的指令是否需要拦截 @@ -49,7 +48,7 @@ public static boolean check(String commandStr, String playerName) { continue outer; } } - if (CmdCb.debug) Bukkit.getLogger().info(ConfigFile.PREFIX_C + "命令列表匹配成功:" + commandList.get(i)); + if (CmdCb.debug) ins.getLogger().info("命令列表匹配成功:" + commandList.get(i)); return true; } } @@ -80,7 +79,7 @@ private static boolean match(String reg, String strs) { } catch (PatternSyntaxException e) { System.out.println("错误的正则表达式:" + e.getPattern()); } - if (CmdCb.debug) System.out.println("reg:" + reg + " " + "strs:" + strs + " " + result); + if (CmdCb.debug) ins.getLogger().info("reg:" + reg + " " + "strs:" + strs + " " + String.valueOf(result)); return result; }