diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt index f9403af94..c1d8415e0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt @@ -136,14 +136,21 @@ class DungeonAPI { @SubscribeEvent fun onChat(event: LorenzChatEvent) { - val floor = dungeonFloor - if (floor != null) { - if (event.message == "§e[NPC] §bMort§f: §rHere, I found this map when I first entered the dungeon.") { - started = true - DungeonStartEvent(floor).postAndCatch() - } - if (event.message.removeColor().matches(uniqueClassBonus)) { - isUniqueClass = true + val floor = dungeonFloor ?: return + if (event.message == "§e[NPC] §bMort§f: §rHere, I found this map when I first entered the dungeon.") { + started = true + DungeonStartEvent(floor).postAndCatch() + } + if (event.message.removeColor().matches(uniqueClassBonus)) { + isUniqueClass = true + } + + if (!LorenzUtils.inSkyBlock) return + killPattern.matchMatcher(event.message.removeColor()) { + val bossCollections = bossStorage ?: return + val boss = DungeonFloor.byBossName(group("boss")) + if (matches() && boss != null && boss !in bossCollections) { + bossCollections.addOrPut(boss, 1) } } } @@ -210,18 +217,6 @@ class DungeonAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { - if (!LorenzUtils.inDungeons) return - killPattern.matchMatcher(event.message.removeColor()) { - val bossCollections = bossStorage ?: return - val boss = DungeonFloor.byBossName(group("boss")) - if (matches() && boss != null && boss !in bossCollections) { - bossCollections.addOrPut(boss, 1) - } - } - } - - @SubscribeEvent fun onDebugDataCollect(event: DebugDataCollectEvent) { event.title("Dungeon") |