Solved Get Damage Dealt After Armor Enchants?

Discussion in 'Plugin Development' started by NerdsWBNerds, Apr 19, 2014.

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

    NerdsWBNerds

    So the amount of damage inside the DamageEvent that is fired is not effected by armor, or their enchantments. How could I get the amount of damage that will be dealt after all the armor and armor enchants are calculated?
     
  2. Offline

    Heirteir

    Get there health before and after they were hit and make a delayed task by 1 milisecond that gives you health before - health after and that will give you the damage done.
    If that was confusing:
    - Get there health before there hit.
    - Make a delayed task with the bukkit scheduler
    - get the health after the milisecond
    - subtract values

    --Heirteir
     
  3. Offline

    NerdsWBNerds

    I want to not use this method because I want to cancel damage if the damage would kill the player, and I can't do that once the damage is already registered.
     
  4. Offline

    LarsNitro

  5. Offline

    clmcd42

  6. Offline

    LarsNitro

  7. Offline

    NerdsWBNerds

Thread Status:
Not open for further replies.

Share This Page