How exact is ItemStack#isSimilar

Discussion in 'BungeeCord Plugin Development' started by yhl, Jul 31, 2018.

  1. yhl


    If I were to have an itemstack and the same one but the other one has one other thing in the lore would it still work? I'm asking this because the method name is making me think that it doesnt have to be exact.
  2. It checks to make sure the type, durability & meta are the same. The only thing making it different from Object::equals is it doesn't take the itemstack amount into account.
  3. Object#equals is essentially a fancy ==. Do you mean ItemStack#equals?