Merge branch 'master' of github.com:CitizensDev/Citizens2

This commit is contained in:
fullwall 2015-08-23 17:36:28 +08:00
commit 2645dc40f7

View File

@ -1154,7 +1154,7 @@ public class NPCCommands {
public void rename(CommandContext args, CommandSender sender, NPC npc) {
String oldName = npc.getName();
String newName = Colorizer.parseColors(args.getJoinedStrings(1));
int nameLength = npc.getTrait(MobType.class).getType() == EntityType.PLAYER ? 16 : 64;
int nameLength = npc.getTrait(MobType.class).getType() == EntityType.PLAYER ? 46 : 64;
if (newName.length() > nameLength) {
Messaging.sendErrorTr(sender, Messages.NPC_NAME_TOO_LONG);
newName = newName.substring(0, nameLength);