mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-22 06:55:36 +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);
|
ItemEnchantments.a list = new ItemEnchantments.a(ItemEnchantments.EMPTY);
|
||||||
|
|
||||||
for (Map.Entry<Enchantment, Integer> entry : enchantments.entrySet()) {
|
if (enchantments != null) {
|
||||||
list.set(CraftEnchantment.bukkitToMinecraftHolder(entry.getKey()), entry.getValue());
|
for (Map.Entry<Enchantment, Integer> entry : enchantments.entrySet()) {
|
||||||
|
list.set(CraftEnchantment.bukkitToMinecraftHolder(entry.getKey()), entry.getValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
list.showInTooltip = !hasItemFlag(itemFlag);
|
list.showInTooltip = !hasItemFlag(itemFlag);
|
||||||
|
|
Loading…
Add table
Reference in a new issue