MenuElement

interface MenuElement

Represents a single element (slot) within a menu.

A MenuElement contains a display ItemStack and an action container that defines click behavior.

Functions

Link copied to clipboard
abstract suspend fun getActionContainer(): ActionContainer?

Returns the action container attached to this menu element. There must first be an item assigned to the slot before an ActionContainer can be configured.

Link copied to clipboard
abstract suspend fun getItem(): ItemStack

Returns the item stack displayed in this menu element.

Link copied to clipboard
abstract suspend fun setItem(item: ItemStack): Menu.MenuElement

Sets the item stack for this menu element.