1.15.2 Give armorpoint to "Player"

Discussion in 'Spigot Plugin Development' started by toto7735, Feb 8, 2021.

  1. I want to give Armor point to a player who is not an armor, is there a good way? (Of course I've done extensive searches) Thank you in advance.

     

    Attached Files:

    #1 toto7735, Feb 8, 2021
    Last edited: Feb 8, 2021
  2. what’s an armor point?
     
    • Like Like x 1
  3. Hey,
    I don't think there is an easy way to just simply an armor point someone.
    I would do is listen to EntityDamageEvent, check if the damaged player has armor points and how many (store them in a hashmap or any other data structure) and manipulate the damage accordingly.

    Armor points protect the player from damage (if you hover any armor piece in the game you can see how many points it gives)
     
    • Like Like x 1
    • Agree Agree x 1