@minecraft/server-ui Module

The @minecraft/server-ui module contains types for expressing simple dialog-based user experiences.

Changelog

Examples

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!");
  }
});

Manifest Details

{
    "module_name": "@minecraft/server-ui",
    "version": "1.1.0"
}

Available Versions

  • 1.2.0-beta
  • 1.1.0
  • 1.0.0
  • 0.1.0

Enumerations

Classes

Errors

Objects

uiManager

static read-only uiManager: UIManager;

Type: UIManager

Caution

This property is still in pre-release. Its signature may change or it may be removed in future releases.