SPIGOT-7909: Always set HIDE_ENCHANTS flag to item if flag is set

This commit is contained in:
md_5 2024-10-06 18:25:07 +11:00
parent 9634597914
commit 45b66f7e4c
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -903,7 +903,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
void applyEnchantments(Map<Enchantment, Integer> enchantments, CraftMetaItem.Applicator tag, ItemMetaKeyType<ItemEnchantments> key, ItemFlag itemFlag) {
if (enchantments == null) {
if (enchantments == null && !hasItemFlag(itemFlag)) {
return;
}