Skip to content

Commit

Permalink
migrate PlayerDeathMessages
Browse files Browse the repository at this point in the history
  • Loading branch information
CalMWolfs committed Jan 2, 2024
1 parent 8c05363 commit 94163bd
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.getLorenzVec
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import net.minecraft.client.entity.EntityOtherPlayerMP
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent

class PlayerDeathMessages {

private val lastTimePlayerSeen = mutableMapOf<String, Long>()

// TODO USE SH-REPO
//§c ☠ §r§7§r§bZeroHazel§r§7 was killed by §r§8§lAshfang§r§7§r§7.
private val deathMessagePattern = "§c ☠ §r§7§r§.(?<name>.+)§r§7 (?<reason>.+)".toPattern()
private val deathMessagePattern by RepoPattern.pattern(
"chat.player.death",
"§c ☠ §r§7§r§.(?<name>.+)§r§7 (?<reason>.+)"
)

@SubscribeEvent
fun onTick(event: LorenzTickEvent) {
Expand Down

0 comments on commit 94163bd

Please sign in to comment.