geforkt von Mirrors/Paper
SPIGOT-4122: Fix an instance of legacy item inequalities
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
9c3b7b278a
Commit
f126de4a5a
@ -254,7 +254,8 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
|
||||
if (stack == this) {
|
||||
return true;
|
||||
}
|
||||
return getType()== stack.getType()&& getDurability() == stack.getDurability() && hasItemMeta() == stack.hasItemMeta() && (hasItemMeta() ? Bukkit.getItemFactory().equals(getItemMeta(), stack.getItemMeta()) : true);
|
||||
Material comparisonType = Bukkit.getUnsafe().fromLegacy(this.getType()); // This may be called from legacy item stacks, try to get the right material
|
||||
return comparisonType == stack.getType() && getDurability() == stack.getDurability() && hasItemMeta() == stack.hasItemMeta() && (hasItemMeta() ? Bukkit.getItemFactory().equals(getItemMeta(), stack.getItemMeta()) : true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren