aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-03-13 20:27:49 +0100
committerGitHub <noreply@github.com>2024-03-13 20:27:49 +0100
commitd411b8bf411c3750b2ad6a2e189554769495188b (patch)
tree572614d2c37f21a00b53facd44c525179e4f0aa3 /src
parentdbd6090a3a232d2211b898df8e026eac68e5abdb (diff)
downloadskyhanni-d411b8bf411c3750b2ad6a2e189554769495188b.tar.gz
skyhanni-d411b8bf411c3750b2ad6a2e189554769495188b.tar.bz2
skyhanni-d411b8bf411c3750b2ad6a2e189554769495188b.zip
Fix: DungeonFinderFeatures IndexOutOfBounds (#1162)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt
index b1d63a24d..964b4653e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt
@@ -164,8 +164,8 @@ class DungeonFinderFeatures {
}
}
if (!config.showMissingClasses) return
- if (!stack.getLore()[0].removeColor().startsWith("Dungeon:")) return
- if (classNames.contains(selectedClass)) classNames[classNames.indexOf(selectedClass)] = "§a${selectedClass}§7"
+ if (stack.getLore().firstOrNull()?.removeColor()?.startsWith("Dungeon:") == false) return
+ if (classNames.contains(selectedClass)) selectedClass = "§a${selectedClass}§7"
event.toolTip.add("")
event.toolTip.add("§cMissing: §7" + createCommaSeparatedList(classNames))
}