Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-2376: Way to distinguish Zombie professions.
Dieser Commit ist enthalten in:
Ursprung
46233ffa8f
Commit
0bc2724e51
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren