From be556926ed942c826389acf38add01c1486a9e08 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 24 Jul 2023 15:31:26 +0200 Subject: code cleanup --- .../at/hannibal2/skyhanni/features/dungeon/DungeonData.kt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonData.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonData.kt index e9ccf9b57..f96788ce0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonData.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonData.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.DungeonBossRoomEnterEvent import at.hannibal2.skyhanni.events.DungeonEnterEvent import at.hannibal2.skyhanni.events.DungeonStartEvent import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.utils.LorenzUtils.equalsOneOf import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor import net.minecraftforge.event.world.WorldEvent @@ -21,15 +22,7 @@ class DungeonData { fun inDungeon() = dungeonFloor != null - fun isOneOf(vararg floors: String): Boolean { - for (floor in floors) { - if (dungeonFloor == floor) { - return true - } - } - - return false - } + fun isOneOf(vararg floors: String) = dungeonFloor?.equalsOneOf(floors) == true fun handleBossMessage(rawMessage: String) { if (!inDungeon()) return -- cgit