summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2011-11-04 16:51:00 +0000
committerKHobbits <rob@khobbits.co.uk>2011-11-04 16:51:00 +0000
commit05242a7e8fe491219798473f5e4dca69a9a4b546 (patch)
tree537496a73231406170de902d74d82970ea37969c
parentfd2ec2291982ba1a7dbb5fd4936685a82da7fea0 (diff)
downloadEssentials-05242a7e8fe491219798473f5e4dca69a9a4b546.tar
Essentials-05242a7e8fe491219798473f5e4dca69a9a4b546.tar.gz
Essentials-05242a7e8fe491219798473f5e4dca69a9a4b546.tar.lz
Essentials-05242a7e8fe491219798473f5e4dca69a9a4b546.tar.xz
Essentials-05242a7e8fe491219798473f5e4dca69a9a4b546.zip
Force displayname update on /list.
Tidy duplicate displayname call.
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java1
-rw-r--r--Essentials/src/com/earth2me/essentials/User.java5
2 files changed, 4 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
index c53c42b70..7a7ae4498 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java
@@ -47,7 +47,6 @@ public class EssentialsPlayerListener extends PlayerListener
public void onPlayerRespawn(final PlayerRespawnEvent event)
{
final User user = ess.getUser(event.getPlayer());
- user.setDisplayNick(user.getNick());
updateCompass(user);
if (ess.getSettings().changeDisplayName())
{
diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java
index 593abccbe..973ffd401 100644
--- a/Essentials/src/com/earth2me/essentials/User.java
+++ b/Essentials/src/com/earth2me/essentials/User.java
@@ -258,7 +258,6 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
if (ess.getSettings().addPrefixSuffix())
{
-
if (!ess.getSettings().disablePrefix())
{
final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', 'ยง').replace("{WORLDNAME}", this.getWorld().getName());
@@ -291,6 +290,10 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
@Override
public String getDisplayName()
{
+ if (ess.getSettings().changeDisplayName())
+ {
+ setDisplayNick(getNick());
+ }
return super.getDisplayName() == null ? super.getName() : super.getDisplayName();
}