Script API - v1.21.90.25
    Preparing search index...

    Module @minecraft/server-ui - v2.0.0Preview

    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.0.0"
    }

    @minecraft/common (Optional in Manifest Details)

    • Requires v1.0.0 or above
    {
    "module_name": "@minecraft/common",
    "version": "1.0.0"
    }

    @minecraft/server (Required in Manifest Details)

    • Requires v2.0.0 or above
    {
    "module_name": "@minecraft/server",
    "version": "2.0.0"
    }

    Install type definition for @minecraft/server-ui module using npm:

    npm i @minecraft/server-ui@2.0.0-rc.1.21.90-preview.25
    

    Enumerations

    FormCancelationReason
    FormRejectReason

    Classes

    ActionFormData

    Builds a simple player form with buttons that let the player take action.

    ActionFormResponse

    Returns data about the player results from a modal action form.

    FormRejectError
    FormResponse

    Base type for a form response.

    MessageFormData

    Builds a simple two-button modal dialog.

    MessageFormResponse

    Returns data about the player results from a modal message form.

    ModalFormData

    Used to create a fully customizable pop-up form for a player.

    ModalFormResponse

    Returns data about player responses to a modal form.

    UIManager

    Interfaces

    ModalFormDataDropdownOptions

    An interface that is passed into @minecraft/Server-ui.ModalFormData.dropdown to provide additional options for the dropdown creation.

    ModalFormDataSliderOptions

    An interface that is passed into @minecraft/Server-ui.ModalFormData.slider to provide additional options for the slider creation.

    ModalFormDataTextFieldOptions

    An interface that is passed into @minecraft/Server-ui.ModalFormData.textField to provide additional options for the textfield creation.

    ModalFormDataToggleOptions

    An interface that is passed into @minecraft/Server-ui.ModalFormData.toggle to provide additional options for the toggle creation.

    Variables

    uiManager