aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorjani270 <69345714+jani270@users.noreply.github.com>2024-09-25 02:38:43 +0200
committerGitHub <noreply@github.com>2024-09-25 02:38:43 +0200
commit0a06b9d9b9d66228b588d452be25945b8f7d8935 (patch)
treeee92076404f017f7aa12b4d7583f3fbbc08590d6 /src/main/java/at/hannibal2/skyhanni/features
parent8195fe5b198019cdef290b433e7d6f1a96e22cc2 (diff)
downloadskyhanni-0a06b9d9b9d66228b588d452be25945b8f7d8935.tar.gz
skyhanni-0a06b9d9b9d66228b588d452be25945b8f7d8935.tar.bz2
skyhanni-0a06b9d9b9d66228b588d452be25945b8f7d8935.zip
Fix: NoSuchElementException in ChumBucketHider (#2587)
Co-authored-by: Linnea Gräf <nea@nea.moe>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt
index 0bb98f8e4..5f64aba8c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt
@@ -66,15 +66,7 @@ object ChumBucketHider {
// Chum Bucket
if (config.hideBucket.get() && entity.inventory.any { it != null && (it.name == "§fEmpty Chum Bucket" || it.name == "§aEmpty Chumcap Bucket") }) {
val entityLocation = entity.getLorenzVec()
- val toSet = try {
- titleEntity.toSet()
- } catch (e: NoSuchElementException) {
- // Caught an NoSuchElementException in ChumBucketHider at CheckRenderEntityEvent: null
- // We know this happens, but we cant fix it, apparently.
- // TODO fix it anyway
- return
- }
- for (title in toSet) {
+ for (title in titleEntity.toSet()) {
if (entityLocation.equalsIgnoreY(title.getLorenzVec())) {
hiddenEntities.add(entity)
event.cancel()