mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-05 16:49:30 +00:00
SPIGOT-7655: ItemMeta#addItemFlags(ItemFlag.HIDE_ATTRIBUTES) not working when no attribute modifiers set
This commit is contained in:
parent
5d84f48a40
commit
4460ecc49e
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…
Add table
Reference in a new issue