From 0e73b5ee418c5c34a46aca6c028dd554387f59fa Mon Sep 17 00:00:00 2001 From: Len <40720638+destro174@users.noreply.github.com> Date: Sun, 18 Sep 2022 14:48:57 +0200 Subject: [PATCH] Check itemmeta when comparing items --- src/main/java/com/alttd/playershops/utils/ShopUtil.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/alttd/playershops/utils/ShopUtil.java b/src/main/java/com/alttd/playershops/utils/ShopUtil.java index 7efd5af..567d4ea 100644 --- a/src/main/java/com/alttd/playershops/utils/ShopUtil.java +++ b/src/main/java/com/alttd/playershops/utils/ShopUtil.java @@ -55,6 +55,8 @@ public class ShopUtil { return false; // Not the same durability if (!stack1.getEnchantments().equals(stack2.getEnchantments())) return false; // They have the same enchants + if (!stack1.getItemMeta().equals(stack2.getItemMeta())) + return false; // They have the same enchants if (stack1.getItemMeta().hasDisplayName() || stack2.getItemMeta().hasDisplayName()) { if (stack1.getItemMeta().hasDisplayName() && stack2.getItemMeta().hasDisplayName()) { if (!stack1.getItemMeta().getDisplayName().equals(stack2.getItemMeta().getDisplayName())) {