diff options
Diffstat (limited to 'src/main/java/me/Danker')
-rw-r--r-- | src/main/java/me/Danker/features/ColouredNames.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/features/ColouredNames.java b/src/main/java/me/Danker/features/ColouredNames.java index aad1ab1..90d722e 100644 --- a/src/main/java/me/Danker/features/ColouredNames.java +++ b/src/main/java/me/Danker/features/ColouredNames.java @@ -11,6 +11,7 @@ import net.minecraft.network.play.server.S45PacketTitle; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; +import net.minecraft.util.StringUtils; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.RenderLivingEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent; @@ -53,7 +54,7 @@ public class ColouredNames { for (String user : users) { for (int i = 0; i < event.toolTip.size(); i++) { - if (event.toolTip.get(i).contains(user)) { + if (StringUtils.stripControlCodes(event.toolTip.get(i)).contains(user)) { event.toolTip.set(i, replaceName(event.toolTip.get(i), user, getColourFromName(user))); } } |