diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-17 23:08:50 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-04-17 23:08:50 +0200 |
| commit | a1e0e192ba5c7e12bf2edbfadefe286d7503f188 (patch) | |
| tree | 5d1ad0a75706857d58eb7e61e68bb58ca902e8a0 /src/main/java/at/hannibal2/skyhanni/features/misc | |
| parent | 9991622e4407d05cc140d6f30ff55c073cbffaa8 (diff) | |
| download | skyhanni-a1e0e192ba5c7e12bf2edbfadefe286d7503f188.tar.gz skyhanni-a1e0e192ba5c7e12bf2edbfadefe286d7503f188.tar.bz2 skyhanni-a1e0e192ba5c7e12bf2edbfadefe286d7503f188.zip | |
to Pattern
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/CompactSplashPotionMessage.kt | 5 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CompactSplashPotionMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CompactSplashPotionMessage.kt index c5e465b54..b5851136b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CompactSplashPotionMessage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CompactSplashPotionMessage.kt @@ -6,15 +6,14 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.StringUtils.removeColor import net.minecraft.util.ChatComponentText import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -import java.util.regex.Pattern class CompactSplashPotionMessage { private val POTION_EFFECT_PATTERN = - Pattern.compile("§a§lBUFF! §fYou have gained §r(.*)§r§f! Press TAB or type /effects to view your active effects!") + "§a§lBUFF! §fYou have gained §r(.*)§r§f! Press TAB or type /effects to view your active effects!".toPattern() private val POTION_EFFECT_OTHERS_PATTERN = - Pattern.compile("§a§lBUFF! §fYou were splashed by (.*) §fwith §r(.*)§r§f! Press TAB or type /effects to view your active effects!") + "§a§lBUFF! §fYou were splashed by (.*) §fwith §r(.*)§r§f! Press TAB or type /effects to view your active effects!".toPattern() @SubscribeEvent fun onChatMessage(event: LorenzChatEvent) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt index 93b5f791e..4cdbffab5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt @@ -18,7 +18,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 NonGodPotEffectDisplay { @@ -44,7 +43,7 @@ class NonGodPotEffectDisplay { "GABAGOEY" to "§9Gabagoey Mixin", ) - private var patternEffectsCount = Pattern.compile("§7You have §e(\\d+) §7non-god effects\\.") + private var patternEffectsCount = "§7You have §e(\\d+) §7non-god effects\\.".toPattern() private var totalEffectsCount = 0 @SubscribeEvent |
