Check itemmeta when comparing items

This commit is contained in:
Len 2022-09-18 14:48:57 +02:00
parent 6eacfb2256
commit 0e73b5ee41

View File

@ -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())) {