-
Type:
New Feature
-
Resolution: Duplicate
-
Priority:
Minor
-
Environment:
Not relevant
-
CraftBukkit version 4473-Spigot-e339edc-20401f1 (MC: 1.21.5) (Implementing API version 1.21.5-R0.1-SNAPSHOT)
-
Yes
The ItemMeta#setBlocksAttacks implementation checks whether the blocksAttacks field is null, and if so, it sets it to null, making it impossible to actually set the BlocksAttacksComponent of the ItemMeta, see:
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java#1628
I assume it was meant to reference the parameter blocksAttacks instead of the field, removing the this keyword should be enough to fix this.
Meant to open this in the CraftBukkit project, apologies
- duplicates
-
SPIGOT-8031 ItemMeta#setBlocksAttacks always sets the BlocksAttacksComponent to null
-
- Resolved
-