ConfirmationDialogBuilder

Builder for confirmation dialogs. Confirmation dialogs display two buttons—yes and no—allowing players to choose between two actions :contentReference[oaicite:10]{index=10}.

Constructors

Inherited properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected Boolean canCloseWithEscape
Link copied to clipboard
protected JsonElement externalTitle
Link copied to clipboard
Link copied to clipboard
protected Boolean pause
Link copied to clipboard
protected JsonElement title
Link copied to clipboard
protected final String type

Functions

Link copied to clipboard
public JsonObject build()
Builds the final JsonObject representing the dialog.
Link copied to clipboard
Sets the button for the negative (no) outcome.
Link copied to clipboard
Sets the button for the positive (yes) outcome.

Inherited functions

Link copied to clipboard
Adds a body element to the dialog.
Link copied to clipboard
Adds an input control to the dialog.
Link copied to clipboard
Sets the after_action behaviour.
Link copied to clipboard
protected JsonObject buildBase()
Builds the common portion of a dialog JSON object.
Link copied to clipboard
public T canCloseWithEscape(boolean canCloseWithEscape)
Controls whether the Escape key closes the dialog.
Link copied to clipboard
public T externalTitle(JsonElement externalTitle)
Sets an external title used when the dialog appears in the pause menu or quick actions list.
public T externalTitle(String text)
Convenience overload for plain string external titles.
Link copied to clipboard
public T pause(boolean pause)
Controls whether the dialog pauses the game in singleplayer.
Link copied to clipboard
public T title(JsonElement title)
Sets the title of the dialog.
public T title(String text)
Convenience overload for plain string titles.
Link copied to clipboard
public String toJson()
Serializes the built dialog to a JSON string.