EntityDamageByEntity vs EntityDamageEvent

Discussion in 'Plugin Development' started by stuntguy3000, Jul 7, 2013.

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


    I am trying to wrap my head around both events, and what to use.

    Things like:
    • Fall damage
    • Voidness
    • Lava..
    Things like
    • PVP
    • Mob
    Is this right? DamageCause works for both events, so is entitydamageevent even needed? what does it do over the second one?
  2. Offline


    I think EntityDamageByEntity and EntityDamageByBlock both extend EntityDamageEvent. So, if I'm not mistaken, EntityDamageEvent is called on every instance of damage, and the sub-classes are more specific. This is all without looking at the javadocs, so don't take my word for it.
    Rocoty likes this.
  3. Offline

    John Cameron

    DamageCause should be the same no matter what, if it's used in the LivingEntity Type
    Also, I think you could use .setLastDamageCause();
  4. Offline


Thread Status:
Not open for further replies.

Share This Page