Skip to main content

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

  1. Set title.
  2. Choose guiType, such as CHEST or CUSTOM.
  3. If the type requires it, set size.
  4. Add a simple layout to layoutPool with an identifier such as main.
  5. Select main in mainLayoutId.
  6. Add GuiItem objects and their interactions to the layout.

Entry fields

Exact fieldRole
guiTypeContainer type: CHEST, CUSTOM, BOOK, MERCHANT, and others.
titleMenu title, compatible with values resolved by TypeWriter.
sizeSize when applicable to guiType.
layoutPoolList of named LayoutData objects.
mainLayoutIdRoot layout identifier.
audioMenu audio configuration.
baseMenuIdParent menu to inherit. Layouts and views are merged.
autoRefreshTicksAutomatic refresh interval; 0 disables it.
viewsAddressable menu views.
defaultViewIdView selected when none is explicitly requested.
breadcrumbSeparatorBreadcrumb separator.
pushHistoryOnViewSwitchAdds view changes to history.
extendToPlayerInventoryExtends 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.

  • viewPermission hides the slot.
  • clickPermission leaves the slot visible but inactive.
  • count, gap, and repeatY repeat the slot; they do not change the item stack. gap is a step, not a spacing: 1 = adjacent slots, 2 = one empty slot between each.

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.