mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-25 01:21:20 +01:00
Override ItemStack#equals
This commit is contained in:
parent
5a308f0ced
commit
f7aeeabe9c
@ -189,6 +189,12 @@ public class ItemStack implements DataContainer, PublicCloneable<ItemStack> {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof ItemStack &&
|
||||
isSimilar((ItemStack) o) && ((ItemStack) o).getAmount() == getAmount();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the item damage (durability).
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user