Exemplo n.º 1
0
 public void setProfession(Profession profession) {
   Validate.notNull(profession);
   getHandle().setProfession(profession.getId());
 }
Exemplo n.º 2
0
 @Override
 public void setProfession(Profession profession) {
   this.profession = profession;
   metadata.set(MetadataIndex.VILLAGER_TYPE, profession.getId());
 }
Exemplo n.º 3
0
 public Profession getProfession() {
   return Profession.getProfession(getHandle().getProfession());
 }
Exemplo n.º 4
0
 public GlowVillager(Location location) {
   super(location, EntityType.VILLAGER, 20);
   Random r = new Random();
   setProfession(Profession.getProfession(r.nextInt(Profession.values().length)));
 }