@minecraft/server-ui
    Preparing search index...

    Class MessageFormDataBeta

    Builds a simple two-button modal dialog.

    Index

    Constructors

    Methods

    • Beta

      Parameters

      • bodyText: string | RawMessage

      Returns MessageFormData

      Method that sets the body text for the modal form.

      This function can't be called in read-only mode.

    • Beta

      Parameters

      • text: string | RawMessage

      Returns MessageFormData

      Method that sets the text for the first button of the dialog.

      This function can't be called in read-only mode.

    • Beta

      Parameters

      • text: string | RawMessage

      Returns MessageFormData

      This method sets the text for the second button on the dialog.

      This function can't be called in read-only mode.

    • Beta

      Parameters

      • player: Player

        Player to show this dialog to.

      Returns Promise<MessageFormResponse>

      Creates and shows this modal popup form. Returns asynchronously when the player confirms or cancels the dialog.

      This function can't be called in read-only mode.

      This function can throw errors.

    • Beta

      Parameters

      • titleText: string | RawMessage

      Returns MessageFormData

      This builder method sets the title for the modal dialog.

      This function can't be called in read-only mode.