Merge pull request #1292 from Brokkonaut/master

Fix memory leak with advancements
This commit is contained in:
fullwall 2017-09-01 12:01:14 +08:00 committed by GitHub
commit 640c182502

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