Container Structure
Top-Level Keys#
| Key | Required | Purpose | Reference |
|---|---|---|---|
Type |
No | Selects the inventory type; defaults to CHEST when Layout is present |
Type |
Title |
No | Sets the inventory title; defaults to KaMenu |
Title |
Settings |
No | Dependency checks, click throttling, and argument rules | Settings |
References |
No | Shared text and templates for the current menu | Menu References |
Layout |
Yes | Maps buttons to physical slots | Layout |
Free-Slots |
No | Named slots that accept or return real player-owned items | Free Slots |
Buttons |
No | Defines buttons referenced by Layout; may be omitted for an entirely empty layout | Buttons |
Properties |
No | Furnace progress, anvil input, and other type-specific values | Properties |
Update |
No | Refreshes the entire container on an interval | Refresh |
Title-Update |
No | Refreshes only the title | Refresh |
Progress-Update |
No | Refreshes furnace progress and evaluates progress events | Refresh |
Events |
No | Open, close, reusable click groups, tasks, and progress events | Events |
Configuration Hierarchy#
Type: CHEST # Inventory type
Title: '&8Menu title' # Top inventory title
Settings: # Prerequisites, throttle, and arguments
References: # Optional shared text and templates
Layout: # Slot layout; always required
Free-Slots: # Optional real-item interaction slots
Update: 20 # Optional full refresh interval in ticks
Title-Update: 40 # Optional title refresh interval in ticks
Progress-Update: 5 # Optional furnace progress interval in ticks
Properties: # Optional furnace/anvil fields
Events: # Optional lifecycle and action groups
Buttons: # Optional buttons referenced by Layout
Recommended authoring order:
- Select the inventory and slot dimensions with
Type. - Place each button in a physical slot with
Layout. - Define
Buttons.<id>.display.materialfor every ID referenced by the layout. - For player-owned inputs, leave the Layout slot empty and bind it under
Free-Slots. - Add click interaction under
Buttons.<id>.actions. - Add
Settings,Properties, refresh fields, andEventsonly when needed.
Complete Skeleton#
Type: CHEST
Title: '&8Container Menu'
Settings:
need_placeholder:
- player
min_click_delay: 200
References:
product_name: '&bProduct'
Update: 20
Title-Update: 40
Layout:
- '#########'
- '####`shop`####'
- '#########'
Events:
Open:
- 'actionbar: &aMenu opened'
Buttons:
'#':
display:
material: GRAY_STAINED_GLASS_PANE
name: ' '
shop:
display:
material: DIAMOND
name: '{ref:product_name}'
actions:
left:
- 'close'
Use {ref:path} to read shared values from References. Container buttons may also use {self:id} and {self:<field-path>} to read their own node. See Menu References for the complete rules.
Body, Inputs, and Bottom are Dialog sections and cannot be added to a Container file. Common events, actions, and conditions are documented under Events, Actions, and Conditions.
Layout is the only top-level key that every Container menu must define. All other keys are optional. A useful menu normally includes a valid layout and definitions for every button ID referenced by that layout.