mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-25 18:37:35 +01:00
SPIGOT-2376: Way to distinguish Zombie professions.
This commit is contained in:
parent
46233ffa8f
commit
0bc2724e51
@ -44,7 +44,7 @@ public class CraftVillager extends CraftAgeable implements Villager, InventoryHo
|
||||
|
||||
public void setProfession(Profession 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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user