From 1481b8150cc4ec81562342eac4bee9490e9aac42 Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Thu, 23 May 2024 16:25:16 +0200 Subject: Fix Open AH/BZ Keybind working while the player doesnt have a active cookie buff (#1182) --- src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index c3be39b2..d87cd863 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -34,6 +34,7 @@ import io.github.moulberry.notenoughupdates.mbgui.MBAnchorPoint; import io.github.moulberry.notenoughupdates.mbgui.MBGuiElement; import io.github.moulberry.notenoughupdates.mbgui.MBGuiGroupAligned; import io.github.moulberry.notenoughupdates.mbgui.MBGuiGroupFloating; +import io.github.moulberry.notenoughupdates.miscfeatures.CookieWarning; import io.github.moulberry.notenoughupdates.miscfeatures.EnchantingSolvers; import io.github.moulberry.notenoughupdates.miscfeatures.SunTzu; import io.github.moulberry.notenoughupdates.miscgui.NeuSearchCalculator; @@ -1219,7 +1220,8 @@ public class NEUOverlay extends Gui { NotEnoughUpdates.INSTANCE.config.ahGraph.graphEnabled) { NotEnoughUpdates.INSTANCE.openGui = new GuiPriceGraph(internalname.get()); return true; - } else if (keyPressed == NotEnoughUpdates.INSTANCE.config.misc.openAHKeybind) { + } else if (keyPressed == NotEnoughUpdates.INSTANCE.config.misc.openAHKeybind && + CookieWarning.hasActiveBoosterCookie()) { String displayName = item.get("displayname").getAsString(); String cleanName = Utils.cleanColour(displayName).replace("[Lvl {LVL}]", "]").trim(); -- cgit