Added default entity type

This commit is contained in:
Németh Noel 2021-05-04 02:20:24 +02:00
parent 6ac0bc831a
commit 7494c5ac58

View File

@ -28,6 +28,7 @@ public class SummonCommand extends Command {
pos = ArgumentType.RelativeVec3("pos"); pos = ArgumentType.RelativeVec3("pos");
entityClass = ArgumentType.Enum("class", EntityClass.class); entityClass = ArgumentType.Enum("class", EntityClass.class);
entityClass.setFormat(ArgumentEnum.Format.LOWER_CASED); entityClass.setFormat(ArgumentEnum.Format.LOWER_CASED);
entityClass.setDefaultValue(EntityClass.CREATURE);
addSyntax(this::execute, entity, pos, entityClass); addSyntax(this::execute, entity, pos, entityClass);
setDefaultExecutor((sender, context) -> sender.sendMessage("Usage: /summon <type> <x> <y> <z> <class>")); setDefaultExecutor((sender, context) -> sender.sendMessage("Usage: /summon <type> <x> <y> <z> <class>"));
} }