diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java index 84624870c..261abf0fe 100644 --- a/Essentials/src/com/earth2me/essentials/ISettings.java +++ b/Essentials/src/com/earth2me/essentials/ISettings.java @@ -162,6 +162,8 @@ public interface ISettings extends IConf { boolean isEcoLogUpdateEnabled(); + boolean realNamesOnList(); + boolean removeGodOnDisconnect(); boolean changeDisplayName(); diff --git a/Essentials/src/com/earth2me/essentials/PlayerList.java b/Essentials/src/com/earth2me/essentials/PlayerList.java index c081ae853..2033658c7 100644 --- a/Essentials/src/com/earth2me/essentials/PlayerList.java +++ b/Essentials/src/com/earth2me/essentials/PlayerList.java @@ -1,6 +1,7 @@ package com.earth2me.essentials; import com.earth2me.essentials.utils.FormatUtil; +import org.bukkit.ChatColor; import org.bukkit.Server; import java.util.*; @@ -27,6 +28,9 @@ public class PlayerList { } user.setDisplayNick(); groupString.append(user.getDisplayName()); + if (ess.getSettings().realNamesOnList() && !ChatColor.stripColor(user.getDisplayName()).equals(user.getName())) { + groupString.append(" (").append(user.getName()).append(")"); + } groupString.append("\u00a7f"); } return groupString.toString(); diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 3f76fc619..ff89cfb2f 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -791,6 +791,11 @@ public class Settings implements net.ess3.api.ISettings { return economyLogUpdate; } + @Override + public boolean realNamesOnList() { + return config.getBoolean("real-names-on-list", false); + } + public boolean _isEcoLogUpdateEnabled() { return config.getBoolean("economy-log-update-enabled", false); } diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index f3b74cbd5..5c4a876ce 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -381,6 +381,9 @@ list: # Uncomment the line below to simply list all players with no grouping #Players: '*' +# Displays real names in /list next to players who are using a nickname. +real-names-on-list: false + # More output to the console. debug: false