From d411b8bf411c3750b2ad6a2e189554769495188b Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Wed, 13 Mar 2024 20:27:49 +0100 Subject: Fix: DungeonFinderFeatures IndexOutOfBounds (#1162) --- .../at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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)) } -- cgit