[SPIGOT-8031] ItemMeta#setBlocksAttacks always sets the BlocksAttacksComponent to null Created: 30/Mar/25 Updated: 31/Mar/25 Resolved: 31/Mar/25 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Javier Flores | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | 1.21.5, bug, craftbukkit | ||
Environment: |
not relevant |
Issue Links: |
|
||||||||
Version: | CraftBukkit version 4473-Spigot-e339edc-20401f1 (MC: 1.21.5) (Implementing API version 1.21.5-R0.1-SNAPSHOT) | ||||||||
Guidelines Read: | Yes |
Description |
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: I assume it was meant to reference the parameter blocksAttacks instead of the field, removing the this keyword should be enough to fix this. |