geforkt von Mirrors/Paper
Fix isEmpty and hashCode for CraftMetaItem
By: Thinkofdeath <thinkofdeath@spigotmc.org>
Dieser Commit ist enthalten in:
Ursprung
ede266a186
Commit
5af21473a1
@ -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;
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren