Skip to content

Inventories and menus

Item stacks, player and block inventories, and custom menus.

Type Kind Description
BlockInventory class The inventory of a block entity by position: chests, trapped chests, barrels, furnaces, blast furnaces, smokers, hoppers, droppers, dispensers, brewing stands and shulker boxes.
ClickType enum How an inventory slot was clicked (vanilla ContainerInput folded with the button).
DragType enum Kind of inventory drag.
EngineInventory class Shared implementation of the inventories the engine owns: one native call per operation, the inventory is addressed by (kind, world, reference) every time, so a handle never keeps anything alive and a block that was destroyed meanwhile simply reads as an empty inventory.
IInventory interface A list of item slots: a player’s inventory, a chest, a plugin menu.
InventoryKind enum The kind of container a player has open.
ItemStack struct An immutable item stack value: an item type, a count and data components.
ItemView struct A read-only view of an item stack inside an event: the item and the count.
Menu class A custom GUI: a container with icons and click handlers that the client shows like a chest, a hopper or a dispenser.
MenuClick class A click in a MenuClick.Menu.
MenuClickType enum The kind of a click in a menu.
MenuCloseReason enum Why a plugin menu was closed for a player.
Menus class Creates menus owned by a plugin (plugin.Menus).
MenuType enum The vanilla menu type a Menu uses (what the client draws).
PlayerInventory class The inventory of a player: 41 slots numbered like the game’s own inventory container, plus the cursor.