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