open_gui
Typewriter Web panel: click Add Page, then use Search bar or + to create the entry with its exact identifier.
open_gui opens a menu for the player and carries its session definition. Start with the essential fields; use advanced layouts after the simple menu works.
Quick start
- Set
title. - Choose
guiType, such asCHESTorCUSTOM. - If the type requires it, set
size. - Add a
simplelayout tolayoutPoolwith an identifier such asmain. - Select
maininmainLayoutId. - Add
GuiItemobjects and their interactions to the layout.
Entry fields
| Exact field | Role |
|---|---|
guiType | Container type: CHEST, CUSTOM, BOOK, MERCHANT, and others. |
title | Menu title, compatible with values resolved by TypeWriter. |
size | Size when applicable to guiType. |
layoutPool | List of named LayoutData objects. |
mainLayoutId | Root layout identifier. |
audio | Menu audio configuration. |
baseMenuId | Parent menu to inherit. Layouts and views are merged. |
autoRefreshTicks | Automatic refresh interval; 0 disables it. |
views | Addressable menu views. |
defaultViewId | View selected when none is explicitly requested. |
breadcrumbSeparator | Breadcrumb separator. |
pushHistoryOnViewSwitch | Adds view changes to history. |
extendToPlayerInventory | Extends rendering to the player inventory according to runtime behavior. |
Connect the root layout
layoutPool is a named set: every layout has an id. mainLayoutId must match one of these identifiers exactly. Child layouts are then connected through innerId, layoutId, children, or frames according to their type.
Inheritance with baseMenuId
When baseMenuId is set, the runtime loads the parent menu and merges its layouts and views. An identifier defined in the child replaces the parent value. mainLayoutId and size can be fallback values when the child does not set them.
Items and permissions
An item can contain item, displayName, lore, criteria, allowPickup, modifiers, triggers, interactionList or interactions, input, isGhost, animation, cooldownTicks, buttonType, buttonPrefix, viewPermission, clickPermission, x, y, count, direction, gap, repeatY, and editorId.
viewPermissionhides the slot.clickPermissionleaves the slot visible but inactive.count,gap, andrepeatYrepeat the slot; they do not change the item stack.gapis a step, not a spacing:1= adjacent slots,2= one empty slot between each.
Navigation
An interaction with executeReturn adds gui:back. An interaction with closeMenu adds gui:close. For tabs, use views and the view: prefix on buttons.
In practice
For a business menu provided by another extension, let the business extension define its buttonType values and handlers. The open_gui menu provides layout, position, appearance, and permissions; the business extension handles the purchase, quest, or reward.