How to edit already set Attribute Modifiers on items?

Discussion in 'Spigot Plugin Development' started by OffsetPaladin89, Jan 7, 2020.

  1. Hello, I'm trying to make a plugin where every 10 blocks you mine while wearing a specific armor set it would increase the attribute of max health by 1, but I do not know how to edit the Attribute Modifier's amount. Thanks!
     
    #1 OffsetPaladin89, Jan 7, 2020
    Last edited: Jan 7, 2020
  2. Mhh... good question. My attempt would be to get the itemstack... getAttributeModifier().getAmount + 1... and than set the item in hand to this itemstack... dont ask me exactly how tho... have to try that later. Maybe i can give you a code example later. :)