Guides / Commands & Data

Dialog screens: building real menus without a mod

Datapack dialogs give you a proper window with inputs and buttons. Here is the JSON shape, how a button runs a command, and how it compares to the book-menu hack.

Server menus used to be written books with clickable pages, or a chest GUI faked with item frames. Dialogs replaced both with an actual screen.

What a dialog is

A JSON file in a datapack that describes a window:

data/<namespace>/dialog/welcome.json
{
  "type": "minecraft:notice",
  "title": { "text": "Welcome" },
  "body": [{ "type": "minecraft:plain_message",
             "contents": { "text": "Pick a class to begin." } }],
  "action": { "label": { "text": "Continue" } }
}

Then /dialog show @p my_pack:welcome.

The types

TypeShape
noticetext plus one dismiss button
confirmationyes / no, each with its own action
multi_actiona grid of buttons
server_linksthe built-in links list
dialog_lista menu that opens other dialogs

multi_action is the workhorse — it is the class-picker, the shop, the warp list.

Buttons run commands

{ "label": { "text": "Warp to spawn" },
  "action": { "type": "minecraft:run_command", "command": "/spawn" } }

Like clickEvent in chat, this runs as the clicking player, at their permission level. A button calling an op-only command does nothing for a normal player. The standard workaround is a trigger objective: the button runs /trigger warp set 1 and a ticking function does the privileged part.

Inputs

"inputs": [
  { "type": "minecraft:text", "key": "name", "label": { "text": "Your name" }, "max_length": 16 },
  { "type": "minecraft:boolean", "key": "pvp", "label": { "text": "Enable PvP" } },
  { "type": "minecraft:single_option", "key": "class", "options": [
      { "id": "mage", "display": { "text": "Mage" } },
      { "id": "rogue", "display": { "text": "Rogue" } } ] }
]

Values arrive as macro arguments to the function the button calls, so the receiving function is a macro:

$say Welcome $(name), you chose $(class)

The $ prefix on the line and $(key) for substitution. That is the whole binding mechanism, and it is what makes dialogs genuinely useful rather than decorative.

Why this beats the book hack

  • It is a screen, so it pauses input rather than sitting in chat history.
  • Inputs actually exist. A book could only offer links.
  • No item required. Nothing to lose, drop or duplicate.
  • It closes cleanly and cannot be scrolled back to.

The one thing books still do better is long-form reading — a dialog body is not a good place for three pages of lore.

Waypoint styles

The same tool covers locator-bar waypoints, which are a separate datapack registry controlling the marker colour and sprite shown for a tracked player or position. Useful for team markers where a bossbar would be too intrusive.

Build dialog screens with inputs and buttons, and customise waypoint styles, in the Dialog Input & Waypoint Style Builder.

Open the Dialog Input & Waypoint Style Builder →

More guides

Browse all →

Looking for more Minecraft tools?

A suite of client-side generators, viewers and converters — all free, all in your browser.