mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-01 14:08:08 +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);
|
Messaging.sendErrorTr(sender, Messages.NPC_NAME_TOO_LONG);
|
||||||
name = name.substring(0, 15);
|
name = name.substring(0, 15);
|
||||||
}
|
}
|
||||||
|
if (name.length() <= 0)
|
||||||
|
throw new CommandException();
|
||||||
|
|
||||||
EntityType type = EntityType.PLAYER;
|
EntityType type = EntityType.PLAYER;
|
||||||
if (args.hasValueFlag("type")) {
|
if (args.hasValueFlag("type")) {
|
||||||
String inputType = args.getFlag("type");
|
String inputType = args.getFlag("type");
|
||||||
|
Loading…
Reference in New Issue
Block a user