-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
ItemMeta#addAttributeModifier wrongly throws IllegalArgumentException #9993
Copy link
Copy link
Labels
good first issueSimple bug fix or feature which would be a good first PR for someone new to the projectSimple bug fix or feature which would be a good first PR for someone new to the projectstatus: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.type: bugSomething doesn't work as it was intended to.Something doesn't work as it was intended to.
Metadata
Metadata
Assignees
Labels
good first issueSimple bug fix or feature which would be a good first PR for someone new to the projectSimple bug fix or feature which would be a good first PR for someone new to the projectstatus: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.type: bugSomething doesn't work as it was intended to.Something doesn't work as it was intended to.
Type
Fields
Give feedbackNo fields configured for Bug.
Projects
Status
Done
Expected behavior
It should be allowed to add AttributeModifiers with same UUID into ItemMeta as long as they have different Attribute types, which is the vanilla behavior.
Observed/Actual behavior
ItemMeta#addAttributeModifier wrongly throws an IllegalArgumentException on adding such an AttributeModifier.
Steps/models to reproduce
Plugin and Datapack List
The only plugin I have is the one I am developing, but it does not seem to be the issue.
I have no datapacks on my server.
Paper version
This server is running Paper version git-Paper-310 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 9993eb9)
You are running the latest version
Previous version: git-Paper-309 (MC: 1.20.2)
(There was a paper update literally while writing this report... I thought my gradle plugin broke lol)
Other
Line 1177-1179 of org.bukkit.craftbukkit.v1_20_R2.inventory.CraftMetaItem:
The issue could be resolved by fixing line 1178 to take Attribute into consideration: