aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-24 15:31:26 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-07-24 15:31:26 +0200
commitbe556926ed942c826389acf38add01c1486a9e08 (patch)
tree32b6b9697b690025017db6cd088946437f064ca1 /src/main/java
parent3ef22687c728ac77235c6f48ef55479d909962f5 (diff)
downloadskyhanni-be556926ed942c826389acf38add01c1486a9e08.tar.gz
skyhanni-be556926ed942c826389acf38add01c1486a9e08.tar.bz2
skyhanni-be556926ed942c826389acf38add01c1486a9e08.zip
code cleanup
Diffstat (limited to 'src/main/java')
-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