summaryrefslogtreecommitdiffstats
path: root/EssentialsChat/src/com
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-07-15 20:35:09 +0200
committersnowleo <schneeleo@gmail.com>2011-07-15 20:35:09 +0200
commit0a91264bcc8bdb5d488897f6a3e10fa3ff0128c5 (patch)
treecefd43583b50f997ddc2bcbd2d65ef492cd3135e /EssentialsChat/src/com
parent07436c0ee828a9e0a358097da4db9ce7fd3b54ad (diff)
downloadEssentials-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.java10
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"))
{