From b514353f39542025df8d800381c8b1e0f4c14fe2 Mon Sep 17 00:00:00 2001 From: ementalo Date: Fri, 1 Apr 2011 10:15:49 +0000 Subject: Temp fix for coloured suffixes git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1076 e251c2fe-e539-e718-e476-b85c1f46cddb --- .../src/com/earth2me/essentials/chat/EssentialsChatWorker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'EssentialsChat') diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java index 09a27f18f..945436eb7 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java @@ -37,7 +37,8 @@ public class EssentialsChatWorker { String prefix = Permissions.Security.getGroupPrefix(user.getWorld().getName(), group).replace('&', '§').replace("{WORLDNAME}", user.getWorld().getName()); String suffix = Permissions.Security.getGroupSuffix(user.getWorld().getName(), group).replace('&', '§').replace("{WORLDNAME}", user.getWorld().getName()); - user.setDisplayName(prefix + user.getNick() + suffix + (suffix.endsWith("§f") ? "" : "§f")); + + user.setDisplayName(prefix + user.getNick() + suffix + (suffix.substring(suffix.length() -2).equals("§") ? "" : "§f")); } catch (Throwable ex) { -- cgit v1.2.3