Try fixing memory leak with advancements

This commit is contained in:
Brokkonaut 2017-08-31 14:45:26 +02:00
parent 0e25c352a0
commit 78992529e5

View File

@ -196,6 +196,12 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
return damaged;
}
@Override
public void die() {
super.die();
getAdvancementData().a();
}
@Override
public void die(DamageSource damagesource) {
// players that die are not normally removed from the world. when the
@ -326,7 +332,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
navigation = new PlayerNavigation(this, world);
NMS.setStepHeight(getBukkitEntity(), 1); // the default (0) breaks step climbing
setSkinFlags((byte) 0xFF);
NMS.setDummyAdvancement(getBukkitEntity());
}
@Override