From 5103e5d1f8d8d9eb0f944927969f1c735a80dc88 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 28 Nov 2023 01:21:36 +0100 Subject: Fixed Pest Spray Display showing outside garden. --- .../at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt index eeb959f4f..8f9fd866f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.features.garden.pests.PestAPI.getPests import at.hannibal2.skyhanni.test.command.ErrorManager +import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderString import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher @@ -44,7 +45,7 @@ class SprayFeatures { @SubscribeEvent fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { - if (!config.pestWhenSelector) return + if (!isEnabled()) return val display = display ?: return @@ -55,4 +56,6 @@ class SprayFeatures { config.position.renderString(display, posLabel = "Pest Spray Selector") } + + fun isEnabled() = LorenzUtils.inSkyBlock && config.pestWhenSelector } -- cgit