For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server-ui/index.md.

Module: server-ui

Beta

@minecraft/server-ui 模块包含了用于基于对话框的简易用户交互功能的类型。

  • ActionFormData 包含了一系列带有标题与图片的按钮。便于要求用户从一系列选项中选择。
  • MessageFormData 则是包含了两个按钮的简易消息框,允许用户选择是/否或者确定/取消。
  • ModalFormData 则提供了一套更具灵活性的类似问卷形式的控件,允许用户填写并提交。

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

  • ActionFormData contain a list of buttons with captions and images that can be used for presenting a set of options to a player.
  • MessageFormData are simple two-button message experiences that are functional for Yes/No or OK/Cancel questions.
  • ModalFormData allow for a more flexible "questionnaire-style" list of controls that can be used to take input.

Manifest Details

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

Enumerations

Classes

Interfaces

Variables