DialogBuilder

public abstract class DialogBuilder<T extends DialogManager.DialogBuilder<T>>

Base builder for all dialog types. Common fields shared by every dialog are exposed here. The type‑specific builders extend this class and override the build method to insert additional keys.

Parameters

<T>

the concrete builder type used for fluent chaining

Inheritors

Constructors

Link copied to clipboard
protected void DialogManager.DialogBuilder(String type)

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
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
public abstract JsonObject build()
Builds the final JsonObject representing the dialog.
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.