Class ActionFormData

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

Hierarchy

  • ActionFormData

Constructors

Methods

Constructors

Methods

  • Parameters

    • bodyText: string | RawMessage

    Returns ActionFormData

    Remarks

    Method that sets the body text for the modal form.

  • Parameters

    • text: string | RawMessage
    • Optional iconPath: string

    Returns ActionFormData

    Remarks

    Adds a button to this form with an icon from a resource pack.

  • Parameters

    • player: Player

      Player to show this dialog to.

    Returns Promise<ActionFormResponse>

    Remarks

    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.

    Throws

    This function can throw errors.

  • Parameters

    • titleText: string | RawMessage

    Returns ActionFormData

    Remarks

    This builder method sets the title for the modal dialog.