mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Fix HIDE_ENCHANTS flag in items without enchantments
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
f77cb8d6c2
commit
7be855108f
1 changed files with 4 additions and 2 deletions
|
@ -909,8 +909,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
|||
|
||||
ItemEnchantments.a list = new ItemEnchantments.a(ItemEnchantments.EMPTY);
|
||||
|
||||
for (Map.Entry<Enchantment, Integer> entry : enchantments.entrySet()) {
|
||||
list.set(CraftEnchantment.bukkitToMinecraftHolder(entry.getKey()), entry.getValue());
|
||||
if (enchantments != null) {
|
||||
for (Map.Entry<Enchantment, Integer> entry : enchantments.entrySet()) {
|
||||
list.set(CraftEnchantment.bukkitToMinecraftHolder(entry.getKey()), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
list.showInTooltip = !hasItemFlag(itemFlag);
|
||||
|
|
Loading…
Reference in a new issue