Refresh the name after custom stuff is done so it applies on disguises

This commit is contained in:
libraryaddict 2015-09-25 14:08:27 +12:00
parent 34d535f153
commit 69517a3dcb

View File

@ -68,9 +68,9 @@ public abstract class EventCreature<T extends LivingEntity> implements Listener
setEntity(entity);
updateEntityHealth();
updateName();
entity.setRemoveWhenFarAway(false);
spawnCustom();
updateName();
}
protected abstract void spawnCustom();
@ -306,7 +306,7 @@ public abstract class EventCreature<T extends LivingEntity> implements Listener
if (cause == DamageCause.FALL && !getEvent().getCondition().HasCondition(_entity, ConditionType.FALLING, null))
event.SetCancelled("Cancel");
if (cause == DamageCause.DROWNING || cause == DamageCause.FALL || cause == DamageCause.SUFFOCATION)
if (cause == DamageCause.DROWNING || cause == DamageCause.SUFFOCATION)
event.SetCancelled("Cancel");
}