Menu Layouts
Layouts dynamically fill a set of slots with items from a collection — the primary tool for building paginated lists, inventories, leaderboards, and any other variable-length content.
How Layouts Work
A
LayoutBlueprintis defined in the menu'slayouts:map.At compute time a
LayoutInstanceis created and bound to a data provider.Items tagged with the layout's
taintare distributed across the layout's slots.Pagination is handled via
next-page,previous-page, andfirst-pageactions.
Blueprint Fields
Field | Type | Description |
|---|---|---|
| String (placeholder) | Resolves to a |
| String | Only |
|
| When any fails the layout renders nothing. |
| object | Optional timer that re-runs the provider and redistributes items (see Auto-refresh). |
Data Providers
The provider placeholder must resolve to one of:
Type | Description |
|---|---|
| Each element is rendered as one layout slot. The element's placeholder context is active while rendering that slot's item. |
| Each key-value pair is exposed as a placeholder context per slot. |
| Custom Java interface for programmatic item generation. |
Providers are typically passed as parameters when opening the menu:
Slot Assignment
Layout slots are defined by associating items with the layout's taint. The slots those items occupy become the layout's available slots. Items are distributed in slot-index order.
Pagination
When the provider has more items than available slots, the layout is automatically paginated.
The current page number is accessible via %layouts_items_page% and the total page count via %layouts_items_maxPages%.
Auto-refresh
A layout can re-run its provider and redistribute items on a repeating timer via a refresh: block — the layout-level analogue of item auto-refresh. Useful for live lists (online players, leaderboards, market listings) that change without a click.
Field | Type | Description |
|---|---|---|
| double (seconds) | Interval between refreshes, in seconds. Accepts a placeholder / |
|
| Optional. Evaluated every tick; if any fails, that tick is skipped (the timer keeps running). |
|
| Optional. Run every tick that requirements pass, immediately before the layout is re-rendered. |
Each tick re-resolves the provider and redistributes items across the layout's slots — the timer-driven equivalent of a refresh-layout action.
Layout Placeholders
%layouts_<id>% resolves to the live layout instance, and any remaining tokens drill into it.
Placeholder | Description |
|---|---|
| Layout identifier |
| Current page index (0-based) |
| Total number of pages |
|
|
|
|
These keys are commonly combined with view-requirements to hide navigation buttons when no further pages exist, e.g. [compare] %layouts_items_hasNextPage% == true.