*/
private void onDeath() {
EntityDeathEvent event;
Entity owner = getOwner();
if (owner instanceof Player) {
event = new PlayerDeathEvent((Player) owner, lastDamageCause, lastDamager);
} else {
event = new EntityDeathEvent(owner, lastDamageCause, lastDamager);
}
if (!getEngine().getEventManager().callEvent(event).isCancelled()) {
if (!(owner instanceof Player)) {