From ae8d3c10c2968a3acdd917b1b77c320a7448c1b0 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Sat, 12 Sep 2020 15:28:00 +0100 Subject: [PATCH] Tweaked new display system --- .../java/com/willfp/ecoenchants/display/EnchantDisplay.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plugin/src/main/java/com/willfp/ecoenchants/display/EnchantDisplay.java b/Plugin/src/main/java/com/willfp/ecoenchants/display/EnchantDisplay.java index 1aacaa1b..7b5d4766 100644 --- a/Plugin/src/main/java/com/willfp/ecoenchants/display/EnchantDisplay.java +++ b/Plugin/src/main/java/com/willfp/ecoenchants/display/EnchantDisplay.java @@ -28,8 +28,9 @@ import java.util.Map; public class EnchantDisplay { /** - * The meta key of the length of enchantments in lore + * The meta key of the length of enchantments in lore (for legacy support) */ + @Deprecated private static final NamespacedKey key = new NamespacedKey(EcoEnchantsPlugin.getInstance(), "ecoenchantlore-len"); /** @@ -103,6 +104,7 @@ public class EnchantDisplay { if(itemLore.size() >= enchantLoreLength) { itemLore.subList(0, enchantLoreLength).clear(); } + meta.getPersistentDataContainer().remove(key); } } catch (NullPointerException ignored) {}