Class PaperConfirmationDialog
java.lang.Object
io.github.projectunified.unidialog.paper.dialog.PaperDialog<PaperConfirmationDialog>
io.github.projectunified.unidialog.paper.dialog.PaperConfirmationDialog
- All Implemented Interfaces:
AdventureDialog<org.bukkit.inventory.ItemStack,,PaperDialogBodyBuilder, PaperDialogInputBuilder, PaperConfirmationDialog> AdventureSupport,ConfirmationDialog<org.bukkit.inventory.ItemStack,,PaperDialogBodyBuilder, PaperDialogInputBuilder, PaperDialog<?>, PaperDialogActionBuilder, PaperConfirmationDialog> Dialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, PaperConfirmationDialog>
public class PaperConfirmationDialog
extends PaperDialog<PaperConfirmationDialog>
implements ConfirmationDialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder,PaperDialogInputBuilder,PaperDialog<?>,PaperDialogActionBuilder,PaperConfirmationDialog>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.projectunified.unidialog.core.dialog.Dialog
Dialog.AfterAction -
Constructor Summary
ConstructorsConstructorDescriptionPaperConfirmationDialog(String defaultNamespace, Function<String, net.kyori.adventure.text.Component> componentDeserializer) -
Method Summary
Modifier and TypeMethodDescriptionprotected io.papermc.paper.registry.data.dialog.type.DialogTypebooleanCheck if the confirmation dialog has a "no" action definedbooleanCheck if the confirmation dialog has a "yes" action definednoAction(Consumer<PaperDialogActionBuilder> action) Set the action for the "no" button in the confirmation dialogyesAction(Consumer<PaperDialogActionBuilder> action) Set the action for the "yes" button in the confirmation dialogMethods inherited from class io.github.projectunified.unidialog.paper.dialog.PaperDialog
afterAction, body, canCloseWithEscape, externalTitle, getAction, getComponentDeserializer, getDialog, getDialogBuilder, input, opener, pause, register, register, register, register, register, register, titleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.projectunified.unidialog.adventure.dialog.AdventureDialog
externalTitle, titleMethods inherited from interface io.github.projectunified.unidialog.adventure.support.AdventureSupport
deserializeMethods inherited from interface io.github.projectunified.unidialog.core.dialog.Dialog
afterAction, body, body, canCloseWithEscape, input, input, opener, pause
-
Constructor Details
-
PaperConfirmationDialog
-
-
Method Details
-
yesAction
Description copied from interface:ConfirmationDialogSet the action for the "yes" button in the confirmation dialog- Specified by:
yesActionin interfaceConfirmationDialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, PaperDialog<?>, PaperDialogActionBuilder, PaperConfirmationDialog> - Parameters:
action- the action to be performed when the "yes" button is clicked- Returns:
- the confirmation dialog itself for method chaining
-
noAction
Description copied from interface:ConfirmationDialogSet the action for the "no" button in the confirmation dialog- Specified by:
noActionin interfaceConfirmationDialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, PaperDialog<?>, PaperDialogActionBuilder, PaperConfirmationDialog> - Parameters:
action- the action to be performed when the "no" button is clicked- Returns:
- the confirmation dialog itself for method chaining
-
hasYesAction
public boolean hasYesAction()Description copied from interface:ConfirmationDialogCheck if the confirmation dialog has a "yes" action defined- Specified by:
hasYesActionin interfaceConfirmationDialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, PaperDialog<?>, PaperDialogActionBuilder, PaperConfirmationDialog> - Returns:
- true if a "yes" action is defined, false otherwise
-
hasNoAction
public boolean hasNoAction()Description copied from interface:ConfirmationDialogCheck if the confirmation dialog has a "no" action defined- Specified by:
hasNoActionin interfaceConfirmationDialog<org.bukkit.inventory.ItemStack,PaperDialogBodyBuilder, PaperDialogInputBuilder, PaperDialog<?>, PaperDialogActionBuilder, PaperConfirmationDialog> - Returns:
- true if a "no" action is defined, false otherwise
-
getDialogType
protected io.papermc.paper.registry.data.dialog.type.DialogType getDialogType()- Specified by:
getDialogTypein classPaperDialog<PaperConfirmationDialog>
-