Item
item/compare
Item Compare
Compares two ItemStacks for similarity or full equality.
Note: "Similar" uses Bukkit's isSimilar() — matching material, display name, lore, enchantments, and NBT but not amount. "Identical" uses equals() which also checks amount.
Inputs
| Name | Type | Optional | Description |
|---|---|---|---|
item_a |
item_stack | First ItemStack. | |
item_b |
item_stack | Second ItemStack. |
Outputs
| Name | Type | Description |
|---|---|---|
similar |
boolean | True if both items are the same type and metadata (ignoring stack size). |
identical |
boolean | True if both items are exactly equal including stack size. |
Examples
Check if held item matches a required item
Verify a player is holding the correct item type.
- Held Item (GET) → item_a → Item Compare
- Create Item (IRON_SWORD) → item_b → Item Compare
- Item Compare → similar → Branch