Dialog Menu
Overview
Dialog Menu opens the native dialog screens of Minecraft 1.21.6 and later, through Paper's dialog API. A dialog is a window in the middle of the screen with a title, a text body, an optional item, buttons and input fields. It needs no resource pack and no custom inventory.
You build the whole dialog in one action entry, Paper Dialog. Each button either runs a command as the player or triggers other TypeWriter entries. Input fields (text, toggle, choice, slider) are read when the player confirms, and their values are inserted into the command with $(key).
Features
- Native dialogs — the vanilla dialog window, opened with Paper's dialog API.
- Three layouts — a grid of buttons, a yes/no confirmation, or a single-button notice.
- Action buttons — run a command as the player, optionally as OP.
- Trigger buttons — fire TypeWriter entries directly, with no command.
- Inputs — text field (including multi-line), toggle, multiple choice and number slider.
- Input values in commands — use
$(key)in a command to insert what the player typed or chose. - Dynamic text — titles, messages and labels accept MiniMessage and PlaceholderAPI placeholders.
- Body item — show an item in the dialog body.
- After-action behaviour — close the dialog, keep it open, or wait for a server response.
- Placeholder — check whether a player currently has a dialog open.
Installation
- Run Paper (or a fork such as Folia) 1.21.6 or later: older versions do not have the dialog API.
- Make sure the Basic extension of TypeWriter is installed (see the TypeWriter documentation).
- Optional: install PlaceholderAPI to use placeholders in texts.
- Put the Dialog Menu JAR in
plugins/Typewriter/extensions/and restart the server.
Getting started
Show a confirmation window before teleporting a player:
- In the TypeWriter web panel, open a sequence page and add a Paper Dialog entry.
- Set
displayNameto<gold>Travel to the spawn?andmessageto the text of the dialog body. - Set
dialogTypetoCONFIRMATION. - In
buttons, add an action button. Set itslabeltoYesand itscommandtospawn. - In
exitButton, setlabeltoNo. Leavecommandempty: the button then only closes the dialog. - Link the entry to what should open it: an NPC interaction, a command, or a dialogue option.
- Publish and trigger the entry in game.
To collect a value, add a text input to buttons: set key to name, buttonLabel to Send, and command to rename $(name). When the player clicks the button, the text is inserted in place of $(name).
asOp runs the command with temporary operator rights. Use it only for commands you fully control, and never insert free text from a player into such a command.
How it works
When the action runs, the dialog is built from the entry and shown to the triggering player. A button is single-use: after a click, its action runs once for that dialog. The dialog is closed or kept open according to afterAction.
All text fields support MiniMessage and placeholders. displayName falls back to the entry name when empty.
Menus
The dialog layout depends on dialogType:
| Type | Layout |
|---|---|
MULTI_ACTION | A grid of buttons with columns columns, plus the exit button when showExitButton is on. |
CONFIRMATION | The vanilla yes/no window: the first button confirms, the exit button declines. The exit button is always built in this mode. |
NOTICE | A single-button window using the first button, or the exit button if there is none. |
The button types you can add to buttons:
| Type | Fields | Command macro |
|---|---|---|
| Action button | label, command, asOp | none |
| Trigger button | label, triggers | none |
| Text input | label, key (default input), buttonLabel, command, asOp, width, labelVisible, initial, maxLength, maxLines, height | $(input) |
| Boolean toggle | label, key (default boolean), initial, onTrue, onFalse, buttonLabel, command, asOp | $(boolean), replaced by onTrue or onFalse |
| Multiple choice | label, key (default choice), options, buttonLabel, command, asOp | $(choice) |
| Number range | label, key (default value), start, end, initial, step, buttonLabel, command, asOp | $(value), rounded to a whole number |
Input fields are shown above the buttons. Every input button also adds its own confirmation button, with buttonLabel as text; a command can use the $(key) of any input in the same dialog. The exit button is configured separately in exitButton.
For a multiple choice, write options as a comma-separated list, and add * after the option that should be selected at first, for example Easy,Normal*,Hard.
Placeholders
PlaceholderAPI placeholders, served by the typewriter expansion.
| Placeholder | Returns |
|---|---|
%typewriter_inmenudialog% | 1 if the player has a dialog from this extension open, otherwise 0. |
%typewriter_inmenudialog_<name>% | 1 if the open dialog is the Paper Dialog entry with this entry name. %typewriter_inmenudialog:<name>% also works. |
The state is cleared when a button is clicked, when the player quits and when TypeWriter reloads. It is not cleared when the player closes the dialog with the Escape key.
Entries
1 entries, generated from the extension source.
Actions1
- Paper DialogDisplay a customizable dialog
Troubleshooting
Nothing is shown when the action runs. Dialogs need Paper 1.21.6 or later. On an older server the dialog API does not exist and the action fails. Also check that the entry's criteria pass.
A button does nothing. Command buttons with an empty command only close the dialog. Otherwise the command is run as the player: if the player lacks the permission for it, it fails silently for them, and a failure is logged as Dialog command '…' failed. Test the command in chat first.
$(key) appears in the command or is replaced by nothing. The key of the input and the macro must match exactly. A macro that matches no input is replaced by an empty text. For toggles, the macro gives the onTrue or onFalse value, not true or false.
The buttons stop working after the first click. Each button is single-use per opened dialog. With afterAction set to NONE or WAIT_FOR_RESPONSE the window can stay on screen, but its buttons no longer react. Re-trigger the action to open a fresh dialog.
%typewriter_inmenudialog% stays at 1. The player closed the dialog with Escape, which does not reset the state. It resets on the next button click, when the player leaves or on reload.
Related extensions
- Companion — open a dialog when the player clicks their companion.