hasItem

fun Inventory.hasItem(material: Material, amount: Int = 1): Boolean

Checks if this inventory contains at least the specified amount of the given material.

Return

true if the inventory contains at least the specified amount, false otherwise

Parameters

material

The material type to check for

amount

The minimum amount required (default is 1)