Removed KEY fully

This commit is contained in:
Auxilor 2020-11-28 11:25:23 +00:00
parent ef4e25b7b1
commit 152e1a830d
3 changed files with 0 additions and 5 deletions

View File

@ -27,7 +27,6 @@ import java.util.stream.Collectors;
* All methods and fields pertaining to showing players the enchantments on their items. * All methods and fields pertaining to showing players the enchantments on their items.
*/ */
public class EnchantDisplay { public class EnchantDisplay {
/** /**
* The meta key to hide enchantments in lore * The meta key to hide enchantments in lore
* *

View File

@ -23,8 +23,6 @@ public class PacketSetSlot extends AbstractPacketAdapter {
if(item.getItemMeta() != null) { if(item.getItemMeta() != null) {
hideEnchants = item.getItemMeta().getItemFlags().contains(ItemFlag.HIDE_ENCHANTS); hideEnchants = item.getItemMeta().getItemFlags().contains(ItemFlag.HIDE_ENCHANTS);
if(hideEnchants && item.getItemMeta().getPersistentDataContainer().has(EnchantDisplay.KEY, PersistentDataType.INTEGER))
hideEnchants = false;
} }
item = EnchantDisplay.displayEnchantments(item, hideEnchants); item = EnchantDisplay.displayEnchantments(item, hideEnchants);

View File

@ -25,8 +25,6 @@ public class PacketWindowItems extends AbstractPacketAdapter {
if(item.getItemMeta() != null) { if(item.getItemMeta() != null) {
hideEnchants = item.getItemMeta().getItemFlags().contains(ItemFlag.HIDE_ENCHANTS); hideEnchants = item.getItemMeta().getItemFlags().contains(ItemFlag.HIDE_ENCHANTS);
if(hideEnchants && item.getItemMeta().getPersistentDataContainer().has(EnchantDisplay.KEY, PersistentDataType.INTEGER))
hideEnchants = false;
} }
EnchantDisplay.displayEnchantments(item, hideEnchants); EnchantDisplay.displayEnchantments(item, hideEnchants);