diff options
Diffstat (limited to 'src/main/java/de/torui')
-rw-r--r-- | src/main/java/de/torui/coflsky/EventHandler.java | 4 | ||||
-rw-r--r-- | src/main/java/de/torui/coflsky/EventRegistry.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/de/torui/coflsky/EventHandler.java b/src/main/java/de/torui/coflsky/EventHandler.java index 6fac06a..55bd4ba 100644 --- a/src/main/java/de/torui/coflsky/EventHandler.java +++ b/src/main/java/de/torui/coflsky/EventHandler.java @@ -30,7 +30,7 @@ public class EventHandler { private static String server = ""; public static void TabMenuData() { - if (isInSkyblock && CoflSky.Wrapper.isRunning){ + if (isInSkyblock && CoflSky.Wrapper.isRunning && Configuration.getInstance().collectTab){ List<String> tabdata = getTabList(); int size = tabdata.size() - 1; for (int i = 0; i < tabdata.size(); i++) { @@ -120,7 +120,7 @@ public class EventHandler { return tabListAsString; } private static void ProcessTabMenu(String line) { - if (line.contains("server:")) { + if (Configuration.getInstance().collectLobbyChanges && line.contains("server:")) { String server_ = line.split("server: ")[1]; if (!server.equals(server_)) { server = server_; diff --git a/src/main/java/de/torui/coflsky/EventRegistry.java b/src/main/java/de/torui/coflsky/EventRegistry.java index 43276db..9d82f14 100644 --- a/src/main/java/de/torui/coflsky/EventRegistry.java +++ b/src/main/java/de/torui/coflsky/EventRegistry.java @@ -39,7 +39,7 @@ import static de.torui.coflsky.EventHandler.ScoreboardData; import static de.torui.coflsky.EventHandler.TabMenuData; public class EventRegistry { - public static Pattern chatpattern = Pattern.compile("", Pattern.CASE_INSENSITIVE); + public static Pattern chatpattern = Pattern.compile("a^", Pattern.CASE_INSENSITIVE); public final ExecutorService chatThreadPool = Executors.newFixedThreadPool(2); public final ExecutorService tickThreadPool = Executors.newFixedThreadPool(2); @SubscribeEvent @@ -134,7 +134,7 @@ public class EventRegistry { @SubscribeEvent public void HandleChatEvent(ClientChatReceivedEvent sce) { - if(CoflSky.Wrapper.isRunning) { + if(CoflSky.Wrapper.isRunning && Configuration.getInstance().collectChat) { chatThreadPool.submit(() -> { String msg = sce.message.getUnformattedText(); Matcher matcher = chatpattern.matcher(msg); |