SPIGOT-2376: Way to distinguish Zombie professions.

This commit is contained in:
md_5 2016-06-11 12:07:17 +10:00
parent 46233ffa8f
commit 0bc2724e51

View File

@ -44,7 +44,7 @@ public class CraftVillager extends CraftAgeable implements Villager, InventoryHo
public void setProfession(Profession profession) { public void setProfession(Profession profession) {
Validate.notNull(profession); Validate.notNull(profession);
Validate.isTrue(0 < profession.ordinal() && profession.ordinal() < Profession.HUSK.ordinal(), "This profession is reserved for Zombies: ", profession); Validate.isTrue(!profession.isZombie(), "Profession is reserved for Zombies: ", profession);
getHandle().setProfession(profession.ordinal() - 1); getHandle().setProfession(profession.ordinal() - 1);
} }