diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2024-06-21 07:39:24 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 23:39:24 +0200 |
commit | d534f73b63578d384c7a69462ca18cf0883926f5 (patch) | |
tree | 80e21e1f0ec41c5dee47712c5d2144281afeb0e7 /src/main/java/at/hannibal2/skyhanni/features/garden | |
parent | 6410dcf999a08d4b6625fdc25f2db148c9df8338 (diff) | |
download | skyhanni-d534f73b63578d384c7a69462ca18cf0883926f5.tar.gz skyhanni-d534f73b63578d384c7a69462ca18cf0883926f5.tar.bz2 skyhanni-d534f73b63578d384c7a69462ca18cf0883926f5.zip |
Backend: Remove deprecated function ChatUtils.error (#2021)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/garden')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt | 7 |
1 files changed, 3 insertions, 4 deletions
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 f7ca31109..d49de324c 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 @@ -281,10 +281,9 @@ object PestAPI { } private fun removeNearestPest() { - val plot = getNearestInfestedPlot() ?: run { - ChatUtils.error("Can not remove nearest pest: No infested plots detected.") - return - } + val plot = getNearestInfestedPlot() + ?: ErrorManager.skyHanniError("Can not remove nearest pest: No infested plots detected.") + if (!plot.isPestCountInaccurate) plot.pests-- scoreboardPests-- updatePests() |