Archy-X / AuraSkills

The ultra-versatile RPG skills plugin
https://aurelium.dev/auraskills
GNU General Public License v3.0
235 stars 88 forks source link

Item flag "hide_attributes" not working on menus #280

Closed VinceSMC closed 3 months ago

VinceSMC commented 3 months ago

Server software and version

Paper 1.20.6 (paper-1.20.6-86)

Expected behavior

Hide item attributes.

Actual behavior

Item attributes are no longer hidden (it's related to MC 1.20.5+).

How to reproduce

Add:

flags:
  - hide_attributes

Additional information

No response

Agreements

Archy-X commented 3 months ago

I've tried to find a solution to this issue when coding 1.20.6 support but I think it's a limitation with the Bukkit API or the new item components system. There doesn't seem to be a way to hide default modifiers in an empty attribute_modifiers component by itself without the tag being removed.

VinceSMC commented 3 months ago

Hi Archy,

Thanks for the reply. You might want to explore using: itemMeta.setAttributeModifiers(Material.IRON_SWORD.getDefaultAttributeModifiers(EquipmentSlot.HAND));

Appreciate your work!

Archy-X commented 3 months ago

Thanks for the snippet, it should be fixed in 2.1.0.