A conversation under a name. Anything a trigger can do can stand in it
dialogue "blacksmith":
send "&6Blacksmith: &fWhat do you need?"
choice "A sword":
give 1 iron sword to player
send "&6Blacksmith: &fHere you go."
choice "Nothing":
send "&6Blacksmith: &7Come back any time."
command /blacksmith:
trigger:
start dialogue "blacksmith"
One of the answers. The choice blocks that follow one another are offered together, and the block of the one that is picked runs. What comes after them runs next
command /pick:
trigger:
send "&7Which team?"
choice "&cRed":
set {%player%.team} to "red"
choice "&9Blue":
set {%player%.team} to "blue"
send "&aYou are on team %{%player%.team}%."
A dialogue "<name>": block, at the left margin like a function, holds a conversation: what is said, and choice "<answer>": blocks for the player to answer by. The answers are shown in chat to click, or to type.
dialogue "blacksmith":
send "&6Blacksmith: &fWhat do you need?"
choice "A sword":
give 1 iron sword to player
send "&6Blacksmith: &fHere you go."
choice "Nothing":
send "&6Blacksmith: &7Come back any time."
command /blacksmith:
trigger:
start dialogue "blacksmith"
Syntax
Meaning
dialogue <name>:
A conversation under a name. Anything a trigger can do can stand in it
choice <text>:
One of the answers. The choice blocks that follow one another are offered together, and the block of the one that is picked runs. What comes after them runs next
start dialogue <name>
Begin it with the player of the trigger
choice works anywhere a script runs for a player, not only inside a dialogue: it is the quick way to ask "which one?".
A choice can hold further choices, which is how a conversation branches.
The player has a minute to answer; with no answer nothing is picked and the lines after the choices run. The line above the answers is messages.choose in config.yml.