mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-17 23:01:01 +01:00
SPIGOT-7655: ItemMeta#addItemFlags(ItemFlag.HIDE_ATTRIBUTES) not working when no attribute modifiers set
By: md_5 <git@md-5.net>
This commit is contained in:
parent
23b13ad11a
commit
54dd884d80
1 changed files with 3 additions and 0 deletions
|
@ -821,6 +821,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
|||
|
||||
void applyModifiers(Multimap<Attribute, AttributeModifier> modifiers, CraftMetaItem.Applicator tag) {
|
||||
if (modifiers == null || modifiers.isEmpty()) {
|
||||
if (hasItemFlag(ItemFlag.HIDE_ATTRIBUTES)) {
|
||||
tag.put(ATTRIBUTES, new ItemAttributeModifiers(Collections.emptyList(), false));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue