mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-27 10:31:21 +01:00
Update NPCCommands.java
This commit is contained in:
parent
38fb49bade
commit
fbfd9db7ce
@ -1159,7 +1159,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);
|
||||
|
Loading…
Reference in New Issue
Block a user