setItem

open override fun setItem(slot: Int, item: KItem)

Sets the given item in the given slot. When changing an item in a slot, the inventory will update accordingly

The slot must not be actually inside the inventory, so a slot of -1 would result in an item left to the slot 0. When now shifting to the right, the item from slot 0 will come

Parameters

slot

the slot

item

the item

See also


open override fun setItem(range: IntRange, item: KItem)

Sets the given item in the given range. When changing an item in a slot, the inventory will update accordingly

Parameters

range

the range

item

the item