Beta
The @minecraft/server-ui module contains types for expressing simple dialog-based user experiences.
@minecraft/server-ui
createActionForm.js
const form = new ActionFormData() .title("Months") .body("Choose your favorite month!") .button("January") .button("February") .button("March") .button("April") .button("May");form.show(players[0]).then((response) => { if (response.selection === 3) { dimension.runCommand("say I like April too!"); }}); Copy
const form = new ActionFormData() .title("Months") .body("Choose your favorite month!") .button("January") .button("February") .button("March") .button("April") .button("May");form.show(players[0]).then((response) => { if (response.selection === 3) { dimension.runCommand("say I like April too!"); }});
Manifest Details
{ "module_name": "@minecraft/server-ui", "version": "1.1.0-internal.1.20.0-preview.25"} Copy
{ "module_name": "@minecraft/server-ui", "version": "1.1.0-internal.1.20.0-preview.25"}
The
@minecraft/server-ui
module contains types for expressing simple dialog-based user experiences.Example
createActionForm.js
Manifest Details