summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-03-23 00:15:22 +0000
committerKHobbits <rob@khobbits.co.uk>2012-03-23 00:15:22 +0000
commit42d01471d3c271ee69c6a610c827cd5da1a49602 (patch)
tree7c140c9a7863ad83e3e1710fa535d596379bb87c
parentc5eb1bb1058dd5d7189b88781980d03b0cd1ff82 (diff)
downloadEssentials-42d01471d3c271ee69c6a610c827cd5da1a49602.tar
Essentials-42d01471d3c271ee69c6a610c827cd5da1a49602.tar.gz
Essentials-42d01471d3c271ee69c6a610c827cd5da1a49602.tar.lz
Essentials-42d01471d3c271ee69c6a610c827cd5da1a49602.tar.xz
Essentials-42d01471d3c271ee69c6a610c827cd5da1a49602.zip
Disabling player list updates by default (can mess with tab completion)
Hopefully this will be reverted if/when patch is found.
-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.