Use stored location in EntityDeathEvent

This commit is contained in:
fullwall 2018-02-18 18:41:22 +08:00
parent ffbeedfccd
commit 1bc5a47ae8

View File

@ -240,7 +240,7 @@ public class EventListen implements Listener {
event.getDrops().clear();
}
final Location location = npc.getEntity().getLocation();
final Location location = npc.getStoredLocation();
Bukkit.getPluginManager().callEvent(new NPCDeathEvent(npc, event));
npc.despawn(DespawnReason.DEATH);