mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-29 12:37:37 +01:00
Check for empty names
This commit is contained in:
parent
1dd695a14f
commit
12c70a0609
@ -269,6 +269,9 @@ public class NPCCommands {
|
||||
Messaging.sendErrorTr(sender, Messages.NPC_NAME_TOO_LONG);
|
||||
name = name.substring(0, 15);
|
||||
}
|
||||
if (name.length() <= 0)
|
||||
throw new CommandException();
|
||||
|
||||
EntityType type = EntityType.PLAYER;
|
||||
if (args.hasValueFlag("type")) {
|
||||
String inputType = args.getFlag("type");
|
||||
|
Loading…
Reference in New Issue
Block a user