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 | 0a91264bcc8bdb5d488897f6a3e10fa3ff0128c5 (patch) | |
tree | cefd43583b50f997ddc2bcbd2d65ef492cd3135e /EssentialsChat/src/com | |
parent | 07436c0ee828a9e0a358097da4db9ce7fd3b54ad (diff) | |
download | Essentials-0a91264bcc8bdb5d488897f6a3e10fa3ff0128c5.tar Essentials-0a91264bcc8bdb5d488897f6a3e10fa3ff0128c5.tar.gz Essentials-0a91264bcc8bdb5d488897f6a3e10fa3ff0128c5.tar.lz Essentials-0a91264bcc8bdb5d488897f6a3e10fa3ff0128c5.tar.xz Essentials-0a91264bcc8bdb5d488897f6a3e10fa3ff0128c5.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')
-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")) { |