From a1e0e192ba5c7e12bf2edbfadefe286d7503f188 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 17 Apr 2023 23:08:50 +0200 Subject: to Pattern --- .../skyhanni/features/summonings/SummoningMobManager.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/summonings') diff --git a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt index 96b06377d..edb2bc2ac 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt @@ -14,7 +14,6 @@ import net.minecraftforge.event.world.WorldEvent import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.gameevent.TickEvent -import java.util.regex.Pattern class SummoningMobManager { @@ -26,14 +25,14 @@ class SummoningMobManager { private var searchMobs = false //§aYou have spawned your Tank Zombie §r§asoul! §r§d(249 Mana) - private val spawnPatter = Pattern.compile("§aYou have spawned your (.+) §r§asoul! §r§d\\((\\d+) Mana\\)") - private val despawnPatter = Pattern.compile("§cYou have despawned your (monster|monsters)!") + private val spawnPatter = "§aYou have spawned your (.+) §r§asoul! §r§d\\((\\d+) Mana\\)".toPattern() + private val despawnPatter = "§cYou have despawned your (monster|monsters)!".toPattern() //§a§ohannibal2's Tank Zombie§r §a160k§c❤ - private val healthPattern = Pattern.compile("§a§o(.+)'s (.+)§r §[ae]([\\dkm]+)§c❤") + private val healthPattern = "§a§o(.+)'s (.+)§r §[ae]([\\dkm]+)§c❤".toPattern() //§cThe Seraph recalled your 3 summoned allies! - private val seraphRecallPattern = Pattern.compile("§cThe Seraph recalled your (\\d) summoned allies!") + private val seraphRecallPattern = "§cThe Seraph recalled your (\\d) summoned allies!".toPattern() @SubscribeEvent fun onChatMessage(event: LorenzChatEvent) { -- cgit