From 0bc2724e51e33101f21b611707fe6a852077d22c Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 11 Jun 2016 12:07:17 +1000 Subject: [PATCH] SPIGOT-2376: Way to distinguish Zombie professions. --- src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java index 5fcf81c4b0..5fa6c4d5e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java @@ -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); }