diff options
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/CompactSplashPotionMessage.kt | 5 |
1 files changed, 3 insertions, 2 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 4cf8c7816..99e6395fd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CompactSplashPotionMessage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CompactSplashPotionMessage.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.LorenzChatEvent 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 @@ -27,9 +28,9 @@ class CompactSplashPotionMessage { matcher = POTION_EFFECT_OTHERS_PATTERN.matcher(event.message) if (matcher.matches()) { - val playerName = matcher.group(1) + val playerName = matcher.group(1).removeColor() val effectName = matcher.group(2) - event.chatComponent = ChatComponentText("§a§lPotion Effect! §r$effectName §7(by $playerName§7)") + event.chatComponent = ChatComponentText("§a§lPotion Effect! §r$effectName §7(by §b$playerName§7)") } } }
\ No newline at end of file |