From 96d5748a5300edc133bc52240001f753485bd8c3 Mon Sep 17 00:00:00 2001 From: HiZe_ Date: Fri, 8 Dec 2023 17:47:30 +0100 Subject: check if player is in garden to render plot border (#776) Fixed showing sprayanator plot grid overlay outside garden. #776 --- .../java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/features') 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 04501d1f4..c51070f03 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 @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.garden.pests import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.GardenPlotAPI import at.hannibal2.skyhanni.features.garden.GardenPlotAPI.renderPlot import at.hannibal2.skyhanni.features.garden.pests.PestAPI.getPests @@ -66,6 +67,7 @@ class SprayFeatures { @SubscribeEvent fun onWorldRender(event: LorenzRenderWorldEvent) { + if (!GardenAPI.inGarden()) return if (!config.drawPlotsBorderWhenInHands) return if (!InventoryUtils.itemInHandId.equals("SPRAYONATOR")) return val plot = GardenPlotAPI.getCurrentPlot() ?: return -- cgit