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
Enumerations
- DataDrivenScreenClosedReason
- FormCancelationReason
- FormRejectReason
- FormVisibilityErrorReason
- TextFilteringError
Classes
- ActionFormData
- ActionFormResponse
- CustomForm
- FormRejectError
- FormResponse
- FormVisibilityError
- InvalidFormError
- InvalidFormModificationError
- InvalidObservableError
- MessageBox
- MessageFormData
- MessageFormResponse
- ModalFormData
- ModalFormResponse
- ObservableBoolean
- ObservableNumber
- ObservableString
- ObservableUIRawMessage
- PlayerLeftError
- UIManager
Interfaces
- ButtonOptions
- DividerOptions
- DropdownItemData
- DropdownOptions
- ImageDetails
- ImageOptions
- MessageBoxButtonOptions
- MessageBoxResult
- ModalFormDataDropdownOptions
- ModalFormDataSliderOptions
- ModalFormDataTextFieldOptions
- ModalFormDataToggleOptions
- ObservableOptions
- SliderOptions
- SpacingOptions
- TextFieldOptions
- TextOptions
- ToggleOptions
- UIRawMessage
