From 9ddf1e43123affc6b187d9ca5a04c544ff66d07d Mon Sep 17 00:00:00 2001 From: Aaron <51387595+AzureAaron@users.noreply.github.com> Date: Sat, 23 Nov 2024 01:48:02 -0500 Subject: [PATCH] Fix it not working when chat is opened prior to the msg being sent --- .../skyblocker/skyblock/chat/ConfirmationPromptHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/chat/ConfirmationPromptHelper.java b/src/main/java/de/hysky/skyblocker/skyblock/chat/ConfirmationPromptHelper.java index 00eb41f80a..3bb0dd8ad1 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/chat/ConfirmationPromptHelper.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/chat/ConfirmationPromptHelper.java @@ -25,7 +25,8 @@ public class ConfirmationPromptHelper { public static void init() { ClientReceiveMessageEvents.GAME.register(ConfirmationPromptHelper::onMessage); ScreenEvents.AFTER_INIT.register((_client, screen, _scaledWidth, _scaledHeight) -> { - if (Utils.isOnSkyblock() && screen instanceof ChatScreen && SkyblockerConfigManager.get().chat.confirmationPromptHelper && hasCommand()) { + //Don't check for the command being present in case the user opens the chat before the prompt is sent + if (Utils.isOnSkyblock() && screen instanceof ChatScreen && SkyblockerConfigManager.get().chat.confirmationPromptHelper) { ScreenMouseEvents.beforeMouseClick(screen).register((_screen1, _mouseX, _mouseY, _button) -> { if (hasCommand()) { MessageScheduler.INSTANCE.sendMessageAfterCooldown(command);