Class BungeeDialog<O extends BungeeDialogOpener,T extends BungeeDialog<O,T>>
java.lang.Object
io.github.projectunified.unidialog.bungeecord.dialog.BungeeDialog<O,T>
- Type Parameters:
O- the type of the dialog openerT- the type of the dialog itself, for method chaining
- All Implemented Interfaces:
Dialog<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, T>
- Direct Known Subclasses:
BungeeConfirmationDialog,BungeeDialogListDialog,BungeeMultiActionDialog,BungeeNoticeDialog,BungeeServerLinksDialog
public abstract class BungeeDialog<O extends BungeeDialogOpener,T extends BungeeDialog<O,T>>
extends Object
implements Dialog<Object,BungeeDialogBodyBuilder,BungeeDialogInputBuilder,T>
The Bungee implementation of the dialog
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.projectunified.unidialog.core.dialog.Dialog
Dialog.AfterAction -
Constructor Summary
ConstructorsConstructorDescriptionBungeeDialog(String defaultNamespace, Function<net.md_5.bungee.api.dialog.Dialog, O> openerFunction) Create a new dialog -
Method Summary
Modifier and TypeMethodDescriptionafterAction(Dialog.AfterAction afterAction) Set the action to be performed after an action is taken in the dialogbody(Consumer<BungeeDialogBodyBuilder> bodyBuilder) Set the body of the dialogcanCloseWithEscape(boolean canCloseWithEscape) Set the option to allow the dialog to be closed with the escape keyprotected abstract net.md_5.bungee.api.dialog.DialogconstructDialog(net.md_5.bungee.api.dialog.DialogBase dialogBase) Construct the Bungee dialog from the given dialog baseexternalTitle(@Nullable String externalTitle) Set the external title of the dialog, which is used for displaying the dialog in a multi-dialog dialogexternalTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent externalTitle) Set the external title of the dialog, which is used for displaying the dialog in a multi-dialog dialogprotected net.md_5.bungee.api.dialog.action.ActionButtongetAction(Consumer<BungeeDialogActionBuilder> action) Build an action button from the given action builder consumerfinal net.md_5.bungee.api.dialog.DialogGet the built Bungee dialoginput(String key, Consumer<BungeeDialogInputBuilder> inputBuilder) Set the input for the dialogopener()Create an opener for the dialogpause(boolean pause) Set the option to pause the game while the dialog is openSet the title of the dialogtitle(net.md_5.bungee.api.chat.BaseComponent title) Set the title of the dialog
-
Constructor Details
-
Method Details
-
title
Set the title of the dialog- Parameters:
title- the title of the dialog- Returns:
- the dialog itself for method chaining
-
title
Description copied from interface:DialogSet the title of the dialog- Specified by:
titlein interfaceDialog<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, T extends BungeeDialog<O, T>> - Parameters:
title- the title of the dialog- Returns:
- the dialog itself for method chaining
-
externalTitle
Set the external title of the dialog, which is used for displaying the dialog in a multi-dialog dialog- Parameters:
externalTitle- the external title of the dialog- Returns:
- the dialog itself for method chaining
-
externalTitle
Description copied from interface:DialogSet the external title of the dialog, which is used for displaying the dialog in a multi-dialog dialog- Specified by:
externalTitlein interfaceDialog<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, T extends BungeeDialog<O, T>> - Parameters:
externalTitle- the external title of the dialog- Returns:
- the dialog itself for method chaining
-
canCloseWithEscape
Description copied from interface:DialogSet the option to allow the dialog to be closed with the escape key- Specified by:
canCloseWithEscapein interfaceDialog<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, T extends BungeeDialog<O, T>> - Parameters:
canCloseWithEscape- whether the dialog can be closed with the escape key- Returns:
- the dialog itself for method chaining
-
pause
Description copied from interface:DialogSet the option to pause the game while the dialog is open- Specified by:
pausein interfaceDialog<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, T extends BungeeDialog<O, T>> - Parameters:
pause- whether the dialog should pause the game- Returns:
- the dialog itself for method chaining
-
afterAction
Description copied from interface:DialogSet the action to be performed after an action is taken in the dialog- Specified by:
afterActionin interfaceDialog<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, T extends BungeeDialog<O, T>> - Parameters:
afterAction- the action to be performed after an action is taken- Returns:
- the dialog itself for method chaining
-
body
Description copied from interface:DialogSet the body of the dialog- Specified by:
bodyin interfaceDialog<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, T extends BungeeDialog<O, T>> - Parameters:
bodyBuilder- the body builder for the dialog- Returns:
- the dialog itself for method chaining
-
input
Description copied from interface:DialogSet the input for the dialog- Specified by:
inputin interfaceDialog<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, T extends BungeeDialog<O, T>> - Parameters:
key- the key for the inputinputBuilder- the input builder for the dialog- Returns:
- the dialog itself for method chaining
-
getAction
protected net.md_5.bungee.api.dialog.action.ActionButton getAction(Consumer<BungeeDialogActionBuilder> action) Build an action button from the given action builder consumer- Parameters:
action- the consumer to configure the action builder- Returns:
- the built action button
-
constructDialog
protected abstract net.md_5.bungee.api.dialog.Dialog constructDialog(net.md_5.bungee.api.dialog.DialogBase dialogBase) Construct the Bungee dialog from the given dialog base- Parameters:
dialogBase- the dialog base containing the shared dialog data- Returns:
- the constructed Bungee dialog
-
getDialog
public final net.md_5.bungee.api.dialog.Dialog getDialog()Get the built Bungee dialog- Returns:
- the built Bungee dialog
-
opener
Description copied from interface:DialogCreate an opener for the dialog- Specified by:
openerin interfaceDialog<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, T extends BungeeDialog<O, T>> - Returns:
- the dialog opener
-