Skip to content

Commit b84aaa1

Browse files
authored
Fix behaviour of /list when showing real names (#3858)
1 parent c6de771 commit b84aaa1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Essentials/src/main/java/com/earth2me/essentials/PlayerList.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ public static String listUsers(final IEssentials ess, final List<User> users, fi
3737
}
3838
user.setDisplayNick();
3939
groupString.append(user.getDisplayName());
40-
if (ess.getSettings().realNamesOnList() && !ChatColor.stripColor(user.getDisplayName()).equals(user.getName())) {
40+
41+
final String strippedNick = FormatUtil.stripFormat(user.getNickname());
42+
if (ess.getSettings().realNamesOnList() && strippedNick != null && !strippedNick.equals(user.getName())) {
4143
groupString.append(" (").append(user.getName()).append(")");
4244
}
4345
groupString.append(ChatColor.WHITE.toString());

0 commit comments

Comments
 (0)