1.15.2 Item Tags and Attributes

Discussion in 'Spigot Plugin Development' started by GamerAPI, Jan 14, 2020.

  1. I have been experimenting with 1.15, though I hate the attack cool downs. I'm trying to figure out how to remove them, and change damage weapons do, but code I've seen doesn't work since NMS changes too much between updates. I've heard that there was an attempt to move away from NBTTags, and if there is a way to do this with just the Bukkit API, that would be very helpful.
  2. Yeah, I was looking through that, though I don't really understand how to use them.
  3. item.getitemmeta
    meta.set whatever
  4. Yes, I understand ItemMeta. I'm talking about Item Attributes. meta.addAttributeModifier takes the parameters Attribute and AttributeModifier. Attribute is just an enum, and the constructor for AttributeModifier has a String name or UUID, a double amount and Operation operation. What I don't understand is what to put for the parameters. I'm assuming that the name you put whatever for, the amount is how much you want to change the Attribute by, and Operation is the way you want to change it.