Class BungeeConfirmationDialog<O extends BungeeDialogOpener>
java.lang.Object
io.github.projectunified.unidialog.bungeecord.dialog.BungeeDialog<O,BungeeConfirmationDialog<O>>
io.github.projectunified.unidialog.bungeecord.dialog.BungeeConfirmationDialog<O>
- Type Parameters:
O- the type of the dialog opener
- All Implemented Interfaces:
ConfirmationDialog<Object,,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder, BungeeConfirmationDialog<O>> Dialog<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeConfirmationDialog<O>>
public class BungeeConfirmationDialog<O extends BungeeDialogOpener>
extends BungeeDialog<O,BungeeConfirmationDialog<O>>
implements ConfirmationDialog<Object,BungeeDialogBodyBuilder,BungeeDialogInputBuilder,BungeeDialog<?,?>,BungeeDialogActionBuilder,BungeeConfirmationDialog<O>>
The Bungee implementation of the confirmation dialog
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.projectunified.unidialog.core.dialog.Dialog
Dialog.AfterAction -
Constructor Summary
ConstructorsConstructorDescriptionBungeeConfirmationDialog(String defaultNamespace, Function<net.md_5.bungee.api.dialog.Dialog, O> openerFunction) Create a new confirmation dialog -
Method Summary
Modifier and TypeMethodDescriptionprotected net.md_5.bungee.api.dialog.DialogconstructDialog(net.md_5.bungee.api.dialog.DialogBase dialogBase) Construct the Bungee dialog from the given dialog basebooleanCheck if the confirmation dialog has a "no" action definedbooleanCheck if the confirmation dialog has a "yes" action definednoAction(Consumer<BungeeDialogActionBuilder> action) Set the action for the "no" button in the confirmation dialogyesAction(Consumer<BungeeDialogActionBuilder> action) Set the action for the "yes" button in the confirmation dialogMethods inherited from class io.github.projectunified.unidialog.bungeecord.dialog.BungeeDialog
afterAction, body, canCloseWithEscape, externalTitle, externalTitle, getAction, getDialog, input, opener, pause, title, 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.core.dialog.Dialog
afterAction, body, body, canCloseWithEscape, externalTitle, input, input, opener, pause, title
-
Constructor Details
-
BungeeConfirmationDialog
public BungeeConfirmationDialog(String defaultNamespace, Function<net.md_5.bungee.api.dialog.Dialog, O> openerFunction) Create a new confirmation dialog- Parameters:
defaultNamespace- the default namespace for the dialog actionsopenerFunction- the function to create the dialog opener from the Bungee dialog
-
-
Method Details
-
yesAction
Description copied from interface:ConfirmationDialogSet the action for the "yes" button in the confirmation dialog- Specified by:
yesActionin interfaceConfirmationDialog<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder, BungeeConfirmationDialog<O extends BungeeDialogOpener>> - 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<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder, BungeeConfirmationDialog<O extends BungeeDialogOpener>> - 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<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder, BungeeConfirmationDialog<O extends BungeeDialogOpener>> - 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<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder, BungeeConfirmationDialog<O extends BungeeDialogOpener>> - Returns:
- true if a "no" action is defined, false otherwise
-
constructDialog
protected net.md_5.bungee.api.dialog.Dialog constructDialog(net.md_5.bungee.api.dialog.DialogBase dialogBase) Description copied from class:BungeeDialogConstruct the Bungee dialog from the given dialog base- Specified by:
constructDialogin classBungeeDialog<O extends BungeeDialogOpener,BungeeConfirmationDialog<O extends BungeeDialogOpener>> - Parameters:
dialogBase- the dialog base containing the shared dialog data- Returns:
- the constructed Bungee dialog
-