Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/dialog: Difference between revisions

From SAS Gaming Wiki
imported>RedX
Remove "si"
 
SyncBot (talk | contribs)
Sync: updated from Minecraft
 
(2 intermediate revisions by the same user not shown)
Line 22: Line 22:
{{argument|dialog|dialog}}
{{argument|dialog|dialog}}
: Specifies the dialog to show to the players. This argument is only used with {{cmd|link=none|dialog show}}.
: Specifies the dialog to show to the players. This argument is only used with {{cmd|link=none|dialog show}}.
: Must be either:
: {{arg desc|je=dialog}}
:* A namespaced ID of a dialog defined in a data pack (e.g., {{code|custom:my_dialog}} or {{code|minecraft:server_links}}). These are stored in the {{cd|minecraft:dialog}} registry.
<!--:* A namespaced ID of a dialog defined in a data pack (e.g., {{code|custom:my_dialog}} or {{code|minecraft:server_links}}). These are stored in the {{cd|minecraft:dialog}} registry.
:* An inline [[Minecraft:SNBT]] defining the dialog structure directly in the command. See {{slink|Dialog|Dialog format}} for the structures.
:* An inline [[Minecraft:SNBT]] defining the dialog structure directly in the command. See {{slink|Dialog|Dialog format}} for the structures.-->


==Result==
==Result==

Latest revision as of 11:17, 9 August 2026

Template:Distinguish Template:Exclusive Template:Infobox command

Manages Minecraft:dialog screens displayed to Minecraft:players. Allows server Minecraft:operators to show custom or predefined dialogs in Minecraft:data pack to specified players, and clear any displayed dialogs on their screen.

Syntax

Template:Cd
Shows a dialog screen from inline Minecraft:SNBT or Template:Cd registry (usually defined in a Minecraft:data pack) to specified players.
Template:Cd
Clears currently displayed dialogs for specified players.

Arguments

Template:Argument

Specifies the players whose dialog is shown or cleared.
Template:Arg desc

Template:Argument

Specifies the dialog to show to the players. This argument is only used with Template:Cmd.
Template:Arg desc

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table

Examples

File:Dialog simple confirmation.png
A simple confirmation dialog from an example.
File:Dialog command execution confirmation.png
Pressing "Yes" results in a command execution, which requires a confirmation from the player.
  • To show the nearest player a dialog located at data/custom/dialog/example/test.json in a loaded data pack:
    /dialog show @p custom:example/test
  • To show all players the built-in minecraft:server_links dialog:
    /dialog show @a minecraft:server_links
  • To show nearest players a notice dialog with title "Hello" and an "Ok" button in the footer:
    /dialog show @p {type:"minecraft:notice",title:"Hello"}
  • To show all players a simple confirmation dialog with two action buttons with the label "Yes please" and "Nope". If the player presses "Yes please", the game runs a command to give the player a Minecraft:diamond, otherwise, if they press "Nope", the game closes the dialog:
    /dialog show @a {type:"minecraft:confirmation",title:"Give yourself diamond?",yes:{label:"Yes please","action":{"type":"run_command","command":"give @s diamond"}},no:{label:"Nope"}}
  • To clear any currently visible dialogs for all players:
    /dialog clear @a

History

Template:HistoryTable

Gallery

References

<references />

Navigation

Template:Navbox commands

Minecraft:de:Befehl/dialog Minecraft:es:Comandos/dialog Minecraft:ja:コマンド/dialog Minecraft:pt:Comandos/dialog Minecraft:zh:命令/dialog