getItemId

abstract fun getItemId(item: ItemStack): Key?(source)

Returns ID of the item in the provider owning it, or null if no provider recognizes the item.