aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt
index 89ebe71d6..45a31fc37 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt
@@ -5,9 +5,11 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
import at.hannibal2.skyhanni.events.ScoreboardChangeEvent
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern
+import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import at.hannibal2.skyhanni.utils.StringUtils.matchFirst
+import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.matches
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -20,7 +22,11 @@ object MiningAPI {
private val glaciteAreaPattern by group.pattern("area.glacite", "Glacite Tunnels")
val coldReset by group.pattern(
"cold.reset",
- "§cThe warmth of the campfire reduced your §r§b❄ Cold §r§cto 0!|§c ☠ §r§7You froze to death§r§7."
+ "§6The warmth of the campfire reduced your §r§b❄ Cold §r§6to §r§a0§r§6!|§c ☠ §r§7You froze to death§r§7."
+ )
+ val coldResetDeath by group.pattern(
+ "cold.deathreset",
+ "§c ☠ §r§7§r§.(?<name>.+)§r§7 (?<reason>.+)"
)
private var cold = 0
@@ -51,6 +57,12 @@ object MiningAPI {
updateCold(0)
lastColdReset = SimpleTimeMark.now()
}
+ coldResetDeath.matchMatcher(event.message) {
+ if (group("name") == LorenzUtils.getPlayerName()) {
+ updateCold(0)
+ lastColdReset = SimpleTimeMark.now()
+ }
+ }
}
@SubscribeEvent