aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt
index f776eb155..1dcc92dab 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt
@@ -35,11 +35,12 @@ class DungeonCopilot {
fun onChatMessage(event: LorenzChatEvent) {
if (!isEnabled()) return
- val blockReason = copilot(event.message)
- if (blockReason != "") event.blockedReason = blockReason
+ copilot(event.message)?.let {
+ event.blockedReason = it
+ }
}
- private fun copilot(message: String): String {
+ private fun copilot(message: String): String? {
countdownPattern.matchMatcher(message) {
changeNextStep("Ready up")
}
@@ -77,7 +78,7 @@ class DungeonCopilot {
changeNextStep("Enter Boss Room")
return "dungeon_copilot"
}
- return ""
+ return null
}
private fun changeNextStep(step: String) {