diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-28 01:21:36 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-28 01:21:36 +0100 |
commit | 5103e5d1f8d8d9eb0f944927969f1c735a80dc88 (patch) | |
tree | 97a1997335f3dba78d3df19692adb6224ca8f856 /src/main/java/at/hannibal2/skyhanni/features/garden | |
parent | babfa567f8149a89f410e82d6f539fc7fa5a714c (diff) | |
download | skyhanni-5103e5d1f8d8d9eb0f944927969f1c735a80dc88.tar.gz skyhanni-5103e5d1f8d8d9eb0f944927969f1c735a80dc88.tar.bz2 skyhanni-5103e5d1f8d8d9eb0f944927969f1c735a80dc88.zip |
Fixed Pest Spray Display showing outside garden.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt | 5 |
1 files changed, 4 insertions, 1 deletions
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 } |