diff options
author | snowleo <schneeleo@gmail.com> | 2011-07-15 20:35:09 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-07-15 20:35:09 +0200 |
commit | d2db6348d92752ee6a07a875ccd63ee779b32361 (patch) | |
tree | b9e7fec0ceb18e4bc53e12c151fff771ad7f4a6e /EssentialsChat/src/com/earth2me | |
parent | ae7275c7ad4de45c2cf2b0903f1a27724d0f2c25 (diff) | |
download | Essentials-d2db6348d92752ee6a07a875ccd63ee779b32361.tar Essentials-d2db6348d92752ee6a07a875ccd63ee779b32361.tar.gz Essentials-d2db6348d92752ee6a07a875ccd63ee779b32361.tar.lz Essentials-d2db6348d92752ee6a07a875ccd63ee779b32361.tar.xz Essentials-d2db6348d92752ee6a07a875ccd63ee779b32361.zip |
Moved user.setDisplayName() from EssentialsChat to Essentials
Added new config: change-displayname (default to true)
It allows users to disable the setDisplayName, if they have other plugins that modify the display name
Updated user.getNick() to use StringBuilder
Diffstat (limited to 'EssentialsChat/src/com/earth2me')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java index 57c41de72..466641e32 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListener.java @@ -35,15 +35,6 @@ public class EssentialsChatPlayerListener extends PlayerListener public void onPlayerJoin(final PlayerJoinEvent event) { final User user = ess.getUser(event.getPlayer()); - updateDisplayName(user); - } - - private void updateDisplayName(final User user) - { - final String prefix = ess.getPermissionsHandler().getPrefix(user).replace('&', '§').replace("{WORLDNAME}", user.getWorld().getName()); - final String suffix = ess.getPermissionsHandler().getSuffix(user).replace('&', '§').replace("{WORLDNAME}", user.getWorld().getName()); - - user.setDisplayName(prefix + user.getNick() + suffix + (suffix.length() > 1 && suffix.substring(suffix.length() - 2, suffix.length() - 1).equals("§") ? "" : "§f")); } @Override @@ -58,7 +49,6 @@ public class EssentialsChatPlayerListener extends PlayerListener return; final User user = ess.getUser(event.getPlayer()); - updateDisplayName(user); if (user.isAuthorized("essentials.chat.color")) { |