Open and Change NPC Dialogue for Players
The /dialogue command in Minecraft Bedrock Edition lets you control NPC dialogue menus directly. You can force an NPC menu to open on a player's screen or switch the conversation scene an NPC uses.
Map makers and creators use this command to build branching conversations and custom stories using scene files from behavior packs. It requires cheats to be enabled and a Game Directors permission level.
/dialogue open <npc: target> <player: target> [sceneName: string]Dialogue with NPC and player, optional sceneName
/dialogue change <npc: target> <sceneName: string> [players: target]Dialogue with NPC and sceneName, optional player
| Argument | Type | What it means |
|---|---|---|
npc | target | A required target selector that selects an entity with the NPC type to run the dialogue. |
player | target | A player name or target selector that identifies who will see the opened dialogue menu. |
players | target | An optional target selector or player name to specify which players see the changed dialogue scene. |
/dialogue open @e[type=npc,c=1] @pOpens the default dialogue menu of the closest NPC for the nearest player.
/dialogue open @e[type=npc,name="Guide"] SteveOpens the dialogue menu of the NPC named Guide for a specific player named Steve.
/dialogue open @e[type=npc,tag=merchant] @a[r=10] shop_introOpens the shop_intro scene from the merchant NPC for all players within a 10-block radius.
/dialogue change @e[type=npc,name="Guard"] gate_warningChanges the dialogue of the Guard NPC to the gate_warning scene for anyone who talks to it next.
/dialogue change @e[type=npc,tag=king] quest_complete @p[tag=winner]Changes the king NPC dialogue to the quest_complete scene only for the nearest player who has the winner tag.
/dialogue open @e[type=npc,x=100,y=64,z=100,r=2] @r secret_roomOpens the secret_room dialogue scene for a random player using the NPC located near coordinates 100, 64, 100.
Minecraft Java Edition does not have a /dialogue command or a built-in NPC entity with dialogue menus.
The open option immediately pops the dialogue menu onto the player's screen, while the change option quietly updates which scene the NPC will show the next time a player interacts with it.
A sceneName is a string that points to a custom scene file stored inside a behavior pack installed on your world.
The command requires the first target to be an entity of type NPC, so make sure you are targeting an actual NPC with a selector like @e[type=npc] and not a standard villager.
/execute/function/packstack/reload/reloadpacketlimitconfig/schedule/scoreboard/scriptevent/sendshowstoreoffer/tag/testfor/testforblock/testforblocks/toggledownfall