diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-07 11:42:37 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-12-07 11:42:37 +0000 |
commit | 6880e5277f990d9852bfd3cd2186c71908f27a47 (patch) | |
tree | fb74785a84050d8ee69c48abf73bc05e6d5466e8 /src/main/java/org/bukkit | |
parent | 6268eb5a3edc61c2cca57a68a44e51a65da01baf (diff) | |
download | craftbukkit-6880e5277f990d9852bfd3cd2186c71908f27a47.tar craftbukkit-6880e5277f990d9852bfd3cd2186c71908f27a47.tar.gz craftbukkit-6880e5277f990d9852bfd3cd2186c71908f27a47.tar.lz craftbukkit-6880e5277f990d9852bfd3cd2186c71908f27a47.tar.xz craftbukkit-6880e5277f990d9852bfd3cd2186c71908f27a47.zip |
Fix isEmpty and hashCode for CraftMetaItem
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java index 9fb42563..466580ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -438,7 +438,7 @@ class CraftMetaItem implements ItemMeta, Repairable { @Overridden boolean isEmpty() { - return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost()); + return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || blockEntityTag != null); } public String getDisplayName() { @@ -582,6 +582,7 @@ class CraftMetaItem implements ItemMeta, Repairable { hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0); hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0); hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0); + hash = 61 * hash + (blockEntityTag != null ? this.blockEntityTag.hashCode() : 0); return hash; } |