Remove white user prefix, if prefix is blank. Messes with EssentialsChat colouring.

This commit is contained in:
KHobbits 2012-03-23 07:56:44 +00:00
parent 2f434291cb
commit 033c2e22cd

View File

@ -291,16 +291,12 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
{
final String prefix = ess.getPermissionsHandler().getPrefix(base).replace('&', '§');
nickname.insert(0, prefix);
if (prefix.length() < 2 || prefix.charAt(0) != '§')
{
nickname.insert(0, "§f");
}
}
if (!ess.getSettings().disableSuffix())
{
final String suffix = ess.getPermissionsHandler().getSuffix(base).replace('&', '§');
nickname.append(suffix);
if (suffix.length() < 2 || !suffix.substring(suffix.length() - 2, suffix.length() - 1).equals("§"))
if (suffix.length() < 2 || suffix.charAt(suffix.length() - 2) != '§')
{
nickname.append("§f");
}