Fix merging of items that aren't actually equal. (Like skulls with textures)

This commit is contained in:
Phoenix616 2017-02-19 17:22:07 +01:00
parent 765548e0e5
commit 11d2280d3e

View File

@ -48,7 +48,10 @@ public class MaterialUtil {
* @return Are they equal? * @return Are they equal?
*/ */
public static boolean equals(ItemStack one, ItemStack two) { public static boolean equals(ItemStack one, ItemStack two) {
return one.isSimilar(two); return one.isSimilar(two)
&& one.toString().equals(two.toString());
// The string comparision is necessary as CB has a bug where it counts items with similar ItemMeta
// but different NBT data as being equal. (See https://hub.spigotmc.org/jira/browse/SPIGOT-3077)
} }
/** /**