From 8eda9ffb7eed8f052b73555102f400a7d0439dc8 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Tue, 24 Jun 2025 18:53:15 +0700 Subject: [PATCH] fix: console commands not working when bot is not logged in on the console server --- build-number.txt | 2 +- .../java/me/chayapak1/chomens_bot/plugins/ConsolePlugin.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build-number.txt b/build-number.txt index e95e0a7c..29a14f9b 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -3476 \ No newline at end of file +3477 \ No newline at end of file diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/ConsolePlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/ConsolePlugin.java index 5b39f265..a1c67506 100644 --- a/src/main/java/me/chayapak1/chomens_bot/plugins/ConsolePlugin.java +++ b/src/main/java/me/chayapak1/chomens_bot/plugins/ConsolePlugin.java @@ -95,8 +95,6 @@ public class ConsolePlugin implements Completer { if (line == null) return; for (final Bot bot : allBots) { - if (!bot.loggedIn) continue; - final String server = bot.getServerString(true); if (!server.equals(consoleServer) && !consoleServer.equalsIgnoreCase("all")) continue; @@ -107,6 +105,8 @@ public class ConsolePlugin implements Completer { continue; } + if (!bot.loggedIn) continue; + final Component stylizedMessage = ChatMessageUtilities.applyChatMessageStyling(line); final Component rendered = RENDERER.render(