From 868b48c82ce1f1099f5544b902e0a3f3a67deae4 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 27 Nov 2011 02:25:12 +0000 Subject: [PATCH] Made ItemStack .equals take into account data and enchantments By: Nathan Adams --- paper-api/src/main/java/org/bukkit/inventory/ItemStack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java index 18df0b734f..e1adce497f 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java @@ -200,7 +200,7 @@ public class ItemStack implements Serializable, ConfigurationSerializable { ItemStack item = (ItemStack) obj; - return item.getAmount() == getAmount() && item.getTypeId() == getTypeId(); + return item.getAmount() == getAmount() && item.getTypeId() == getTypeId() && getDurability() == item.getDurability() && getEnchantments().equals(item.getEnchantments()); } @Override