GameplayJava
/dialog
Opens a data-driven dialog UI (buttons, text, inputs) for players — added in 1.21.6. Show a registered dialog, clear the current one, or show one without adding it to the player's history. Powers in-game menus and prompts built by datapacks.
What is /dialog used for?
What /dialog is for
Opens a data-driven dialog UI (buttons, text, inputs) for players — added in 1.21.6.
When to use /dialog
Show in-game menus and prompts built by datapacks. /dialog clear closes the current one.
Syntax
Parameters
- action
- literal
- show or clear.
- targets
- entity selector
- Players to show/clear the dialog for.
- dialogoptional
- dialog ID or inline
- The dialog to display (for show).
Examples
Show the 'welcome' dialog to everyone.
Close your current dialog.
Permission level
/dialog requires Cheats (op level 2). In single-player you need the world's "Allow Cheats" toggle on. On a multiplayer server you need to be opped — see /op.