aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonData.kt11
1 files changed, 2 insertions, 9 deletions
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