Calculate damage resistance for player

Discussion in 'Plugin Development' started by xLoGiiKzZo, Jun 29, 2014.

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

    xLoGiiKzZo

    Is it possible to calculate how much damage resistance a player has?
    Ex: I'm trying to set a players health to 10.0 when he gets hurt. Setting the event damage to 10.0 won't always work because if the player is wearing armor and/or has potion effects, it will reduce the damage the player is receiving. using .setHealth(10.0) will work, but the player won't have a killer if I set it to 0.0 using .setHealth (which I will need to do).
     
  2. Offline

    jthort

    xLoGiiKzZo you could create a do while loop that removes one while their health is greater than 10
     
Thread Status:
Not open for further replies.

Share This Page