Fix long prefix breaking setPlayerListName(), because they are too long.

If Essentials detects, that the player name would be too long with prefix and suffix to fit in the player list, it will only update the name without prefix and suffix but with nickname and opcolor.
This commit is contained in:
snowleo 2011-11-20 16:43:38 +01:00
parent 6633b39954
commit 14cc499421
4 changed files with 18 additions and 13 deletions

View file

@ -61,8 +61,8 @@ public class Commandnick extends EssentialsCommand
}
else if ("off".equalsIgnoreCase(nick) || target.getName().equalsIgnoreCase(nick))
{
target.setDisplayNick(target.getName());
target.setNickname(null);
target.setDisplayNick();
target.sendMessage(Util.i18n("nickNoMore"));
}
else
@ -83,8 +83,8 @@ public class Commandnick extends EssentialsCommand
}
}
target.setDisplayNick(ess.getSettings().getNicknamePrefix() + formattedNick);
target.setNickname(formattedNick);
target.setDisplayNick();
target.sendMessage(Util.format("nickSet", target.getDisplayName() + "§7."));
}
}