aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-07 03:36:08 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-01-07 03:36:08 +0100
commit2db3001ea732fd2d66ada70100459d095bb4ef26 (patch)
treefdc88824deb3c88d1e031078e76b73bb8d17d259 /src/main/java/at
parent7d0223d1cbc09909b8989c8aea2576a171acdaea (diff)
downloadskyhanni-2db3001ea732fd2d66ada70100459d095bb4ef26.tar.gz
skyhanni-2db3001ea732fd2d66ada70100459d095bb4ef26.tar.bz2
skyhanni-2db3001ea732fd2d66ada70100459d095bb4ef26.zip
Removed player rank color from custom potion splash message.
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/CompactSplashPotionMessage.kt5
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