From bdef8e3d684921684afe950f71927a1dcb882d3a Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Mon, 29 Apr 2024 14:23:18 +0200 Subject: Fix: Delay between fixPests calls (#1591) --- .../java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt index 98e712167..1351ab5bd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt @@ -20,6 +20,7 @@ import at.hannibal2.skyhanni.features.garden.GardenPlotAPI.pests import at.hannibal2.skyhanni.features.garden.GardenPlotAPI.uncleared import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ChatUtils +import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LocationUtils.distanceSqToPlayer @@ -136,7 +137,11 @@ object PestAPI { it.pests = 0 it.isPestCountInaccurate = true } - if (loop > 0) fixPests(loop - 1) + if (loop > 0) { + DelayedRun.runDelayed(2.seconds) { + fixPests(loop - 1) + } + } else sendPestError() } } -- cgit