[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
This commit is contained in:
snowleo 2011-04-01 22:46:27 +00:00
parent 3c59ec9c58
commit bd234780cf
1 changed files with 1 additions and 1 deletions

View File

@ -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)
{