Skip to content

Commit

Permalink
check if player is in garden to render plot border (#776)
Browse files Browse the repository at this point in the history
Fixed showing sprayanator plot grid overlay outside garden. #776
  • Loading branch information
superhize authored Dec 8, 2023
1 parent 45cbc37 commit 96d5748
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 96d5748

Please sign in to comment.