diff options
author | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-01 22:46:27 +0000 |
---|---|---|
committer | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-01 22:46:27 +0000 |
commit | bd234780cfce93b267ec93d6114d188ddea872d9 (patch) | |
tree | 442df5f1fb2ad10a93028af5e44eec1c15e8c864 /EssentialsChat/src/com/earth2me | |
parent | 3c59ec9c5862493543b0fa0efe96c7ed2354d05e (diff) | |
download | Essentials-bd234780cfce93b267ec93d6114d188ddea872d9.tar Essentials-bd234780cfce93b267ec93d6114d188ddea872d9.tar.gz Essentials-bd234780cfce93b267ec93d6114d188ddea872d9.tar.lz Essentials-bd234780cfce93b267ec93d6114d188ddea872d9.tar.xz Essentials-bd234780cfce93b267ec93d6114d188ddea872d9.zip |
[trunk] Handle suffix with a size of 0 or 1.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1085 e251c2fe-e539-e718-e476-b85c1f46cddb
Diffstat (limited to 'EssentialsChat/src/com/earth2me')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java index 945436eb7..9cf9589cb 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java @@ -38,7 +38,7 @@ 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.substring(suffix.length() -2).equals("§") ? "" : "§f")); + user.setDisplayName(prefix + user.getNick() + suffix + (suffix.length() > 1 && suffix.substring(suffix.length() -2).equals("§") ? "" : "§f")); } catch (Throwable ex) { |