KtInventory

interface KtInventory

KtInventory

Since

1.0.0

See also

Properties

Link copied to clipboard
abstract val bukkitInventory: Inventory

Inventory

Functions

Link copied to clipboard
abstract fun item(index: Int, itemStack: ItemStack)

Set the item. The action on click is not changed, and the previous one is inherited.

abstract fun item(index: Int, itemStack: ItemStack, block: (InventoryClickEvent) -> Unit?)

Set the item and the action on click.

Link copied to clipboard
abstract fun onClick(block: (InventoryClickEvent) -> Unit?)

Change the action that is executed before each action of item on click. The default is event cancellation.

abstract fun onClick(index: Int, block: (InventoryClickEvent) -> Unit?)

Set the action on click.

Link copied to clipboard
abstract fun onClose(block: (InventoryCloseEvent) -> Unit?)

Change the action on closed.

Link copied to clipboard
abstract fun onOpen(block: (InventoryOpenEvent) -> Unit?)

Change the action on opened.

Link copied to clipboard
abstract fun open(player: HumanEntity)

Open the inventory.