From b84aaa1dabdac52a9fe3e6f3357fe41a0d9cd5fe Mon Sep 17 00:00:00 2001 From: triagonal <10545540+triagonal@users.noreply.github.com> Date: Fri, 1 Jan 2021 11:14:39 +1100 Subject: [PATCH] Fix behaviour of /list when showing real names (#3858) --- .../src/main/java/com/earth2me/essentials/PlayerList.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Essentials/src/main/java/com/earth2me/essentials/PlayerList.java b/Essentials/src/main/java/com/earth2me/essentials/PlayerList.java index 7b4dc59d5..91b8cc59b 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/PlayerList.java +++ b/Essentials/src/main/java/com/earth2me/essentials/PlayerList.java @@ -37,7 +37,9 @@ public final class PlayerList { } user.setDisplayNick(); groupString.append(user.getDisplayName()); - if (ess.getSettings().realNamesOnList() && !ChatColor.stripColor(user.getDisplayName()).equals(user.getName())) { + + final String strippedNick = FormatUtil.stripFormat(user.getNickname()); + if (ess.getSettings().realNamesOnList() && strippedNick != null && !strippedNick.equals(user.getName())) { groupString.append(" (").append(user.getName()).append(")"); } groupString.append(ChatColor.WHITE.toString());