-
-
Notifications
You must be signed in to change notification settings - Fork 1
PaperMC
Huynh Tien edited this page Aug 17, 2025
·
3 revisions
Add io.github.projectunified:uni-dialog-paper to your build tools
For example, here is the dependency for Maven:
<dependency>
<groupId>io.github.projectunified</groupId>
<artifactId>uni-dialog-paper</artifactId>
<version>VERSION</version>
</dependency>Check here for more information on other build tools
Check here for the JavaDoc
Create a PaperDialogManager like this:
PaperDialogManager dialogManager = new SpigotDialogManager(plugin);Simply call the register method
dialogManager.register()The preferred way is to construct a Dialog and call its opener to get the DialogOpener. The DialogOpener is preserved and used to open the dialog for the player.
DialogOpener dialogOpener = dialogManager.createConfirmationDialog()
.title("Sample Dialog")
.canCloseWithEscape(true)
.afterAction(Dialog.AfterAction.CLOSE)
.body(builder -> builder.text().text("This is a sample dialog. Do you want to proceed?"))
.input("name", builder -> builder.textInput().label("Enter your name:"))
.yesAction(builder -> builder.label("Confirm"))
.noAction(builder -> builder.label("Cancel"))
.opener();UUID playerUUID;
dialogOpener.open(playerUUID);