getItem

abstract fun getItem(index: Int): ItemStack

Retrieve an item from this inventory at the specified index.

Return

the item at that slot, or ItemStack.empty if there is no item at that slot

Parameters

index

the index (slot, starts from 0) of the item to retrieve

Throws

if index is out of bounds (not in 0 <= index<size)