From 2fedc55ea587881a7675008fb6319c4e252f22d9 Mon Sep 17 00:00:00 2001 From: cnaude Date: Fri, 29 Apr 2016 22:16:00 -0700 Subject: [PATCH] Add zero-width-space to display name. --- .../java/com/cnaude/purpleirc/Utilities/ChatTokenizer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/cnaude/purpleirc/Utilities/ChatTokenizer.java b/src/main/java/com/cnaude/purpleirc/Utilities/ChatTokenizer.java index 1d5b457..3369b1b 100644 --- a/src/main/java/com/cnaude/purpleirc/Utilities/ChatTokenizer.java +++ b/src/main/java/com/cnaude/purpleirc/Utilities/ChatTokenizer.java @@ -770,10 +770,13 @@ public class ChatTokenizer { */ public String playerTokenizer(Player player, String message) { String pName; + String displayName; if (plugin.pingFixTemplate) { pName = addZeroWidthSpace(player.getName()); + displayName = addZeroWidthSpace(player.getDisplayName()); } else { pName = player.getName(); + displayName = player.getDisplayName(); } plugin.logDebug("Tokenizing " + pName + "(O: " + player.isOnline() + ")"); String pSuffix = plugin.getPlayerSuffix(player); @@ -781,7 +784,7 @@ public class ChatTokenizer { String gPrefix = plugin.getGroupPrefix(player); String gSuffix = plugin.getGroupSuffix(player); String group = plugin.getPlayerGroup(player); - String displayName = player.getDisplayName(); + UUID uuid = player.getUniqueId(); String playerIP = ""; try {