SPIGOT-5028: Villager#setVillagerExperience() doesn't work

This commit is contained in:
md_5 2019-06-06 20:46:32 +10:00
parent bdbdbe4459
commit 0fc6922bf3

View File

@ -68,14 +68,14 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
@Override
public int getVillagerExperience() {
return getHandle().dV();
return getHandle().getExperience();
}
@Override
public void setVillagerExperience(int experience) {
Preconditions.checkArgument(experience >= 0, "Experience must be positive");
getHandle().t(experience);
getHandle().setExperience(experience);
}
public static Profession nmsToBukkitProfession(VillagerProfession nms) {