summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/ISettings.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/Settings.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/User.java17
-rw-r--r--Essentials/src/config.yml3
4 files changed, 21 insertions, 7 deletions
diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java
index fe12720ea..1ef8feaa9 100644
--- a/Essentials/src/com/earth2me/essentials/ISettings.java
+++ b/Essentials/src/com/earth2me/essentials/ISettings.java
@@ -127,6 +127,8 @@ public interface ISettings extends IConf
boolean removeGodOnDisconnect();
boolean changeDisplayName();
+
+ boolean changePlayerListName();
boolean isPlayerCommand(String string);
diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java
index 2aa1d93c1..e194cf21b 100644
--- a/Essentials/src/com/earth2me/essentials/Settings.java
+++ b/Essentials/src/com/earth2me/essentials/Settings.java
@@ -609,6 +609,12 @@ public class Settings implements ISettings
{
return config.getBoolean("change-displayname", true);
}
+
+ @Override
+ public boolean changePlayerListName()
+ {
+ return config.getBoolean("change-playerlist", false);
+ }
@Override
public boolean useBukkitPermissions()
diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java
index c4293cc63..d84ab84aa 100644
--- a/Essentials/src/com/earth2me/essentials/User.java
+++ b/Essentials/src/com/earth2me/essentials/User.java
@@ -328,15 +328,18 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{
name = Util.stripFormat(name);
}
- try
- {
- setPlayerListName(name);
- }
- catch (IllegalArgumentException e)
+ if (ess.getSettings().changePlayerListName())
{
- if (ess.getSettings().isDebug())
+ try
+ {
+ setPlayerListName(name);
+ }
+ catch (IllegalArgumentException e)
{
- logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Name clashed with another online player.");
+ if (ess.getSettings().isDebug())
+ {
+ logger.log(Level.INFO, "Playerlist for " + name + " was not updated. Name clashed with another online player.");
+ }
}
}
}
diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml
index 5462b6c12..657030626 100644
--- a/Essentials/src/config.yml
+++ b/Essentials/src/config.yml
@@ -33,6 +33,9 @@ nickname-prefix: '~'
# Disable this if you have any other plugin, that modifies the displayname of a user.
change-displayname: true
+# When this option is enabled, the (tab) player list will be updated with nicknames and colours.
+#change-playerlist: true
+
# Adds the prefix and suffix to the displayname of the player, so it will be displayed in messages and lists.
# The prefix/suffix can be set using Permissions, Group Manager or PermissionsEx.
# The value of change-displayname (above) has to be true.