DialogUtil

public class DialogUtil implements Listener

Utility for opening Paper Dialog API inputs and returning results via callbacks.

Constructors

Link copied to clipboard
public void DialogUtil(Plugin plugin)

Functions

Link copied to clipboard
public boolean canUseDialogs()
Link copied to clipboard
public void getInput(Component title, Player player, String key, Component content, Consumer<String> callback)

public void getInput(Component title, Player player, String key, Component content, String defaultValue, Consumer<String> callback)
Opens a text input dialog for a player and calls callback with the result when the player confirms, or with null if they discard.
Link copied to clipboard
public void getYesNo(Component title, Player player, String key, Consumer<String> callback)
Opens a text input dialog for a player and calls callback with the result when the player confirms, or with null if they discard.
Link copied to clipboard
public void onDialogClick(PlayerCustomClickEvent event)
Link copied to clipboard
public void open(Dialog dialog, Player player)
Opens a dialog without an input (informational / confirmation only).