Skip to content

Apply item attribute key fix to base_v1_21_4 - #1525

Open
JToTl wants to merge 1 commit into
elBukkit:mainfrom
JToTl:fix/base-v1-21-4-attribute-keys
Open

Apply item attribute key fix to base_v1_21_4#1525
JToTl wants to merge 1 commit into
elBukkit:mainfrom
JToTl:fix/base-v1-21-4-attribute-keys

Conversation

@JToTl

@JToTl JToTl commented Aug 21, 2026

Copy link
Copy Markdown

This is a follow-up to #1506. The fix in commit 958fcb0 added the key-aware setItemAttribute overload and updated the v26 implementations, but base_v1_21_4 was not updated.

base_v1_21_4 continued to inherit setItemAttribute from base_v1_20_5. The inherited implementation does not use attributeKey; it calls createAttributeModifier with the UUID instead. The existing override in base_v1_21_4 then converts this to the constant key magic:modifier, so multiple modifiers can still receive the same key.

This change overrides the key-aware overload in base_v1_21_4 and creates the modifier using the supplied key. When no key is specified, it generates the same default key used by the v26 implementations: modifier_<attribute>_<slot>.

The five- and six-argument overloads remain inherited from base_v1_20_5 and delegate to this override.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant