Player take hit animation

Discussion in 'Plugin Development' started by Ziden, Jan 5, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Ziden

    Hi there. Im implementing an attack speed system. Ive disabled no damage delay when hit by cancelling damage event and using setHealth(ev.getFinalDamage()) but the player dont even flash red. I cannot use .damage as it will cause an infinite loop. setNoDamageTicks have not worked as well.

    Is there a way i can player say "UGH" (well, i know that one using playsound) and flashing red just as it does when it gets hit ?

    Thanks alot for the attention !
     
  2. Offline

    MisterErwin

    @Ziden afaik there is a playEffect method for LivingEntities.

    So you could use LivingEntity#playEffect(EntityEffect.HURT);
     
Thread Status:
Not open for further replies.

Share This Page