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
commitbac1cb41dce7fb1874e5a95b0c404da62f4955d4 (patch)
tree5befa9ca6715f3e5f712868c83e12d26fef8500b
parentec732df2d802f8e4adb599ba6a856131b9810654 (diff)
downloadEssentials-bac1cb41dce7fb1874e5a95b0c404da62f4955d4.tar
Essentials-bac1cb41dce7fb1874e5a95b0c404da62f4955d4.tar.gz
Essentials-bac1cb41dce7fb1874e5a95b0c404da62f4955d4.tar.lz
Essentials-bac1cb41dce7fb1874e5a95b0c404da62f4955d4.tar.xz
Essentials-bac1cb41dce7fb1874e5a95b0c404da62f4955d4.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.