Trim name length to 16 chars not 15

This commit is contained in:
fullwall 2013-08-14 22:53:00 +08:00
parent c4703e1f62
commit bc5704128a

View File

@ -281,7 +281,7 @@ public class NPCCommands {
String name = Colorizer.parseColors(args.getJoinedStrings(1)); String name = Colorizer.parseColors(args.getJoinedStrings(1));
if (name.length() > 16) { if (name.length() > 16) {
Messaging.sendErrorTr(sender, Messages.NPC_NAME_TOO_LONG); Messaging.sendErrorTr(sender, Messages.NPC_NAME_TOO_LONG);
name = name.substring(0, 15); name = name.substring(0, 16);
} }
if (name.length() <= 0) if (name.length() <= 0)
throw new CommandException(); throw new CommandException();