Interface Dialog<I,BB extends DialogBodyBuilder<I>,IB extends DialogInputBuilder,T extends Dialog<I,BB,IB,T>>
- Type Parameters:
I
- the type of the item for the item bodyBB
- the type of the dialog body builderIB
- the type of the dialog input builderT
- the type of the dialog itself, for method chaining
- All Known Subinterfaces:
AdventureDialog<I,
,BB, IB, T> ConfirmationDialog<I,
,BB, IB, D, AB, T> DialogListDialog<I,
,BB, IB, D, AB, T> MultiActionDialog<I,
,BB, IB, D, AB, T> NoticeDialog<I,
,BB, IB, D, AB, T> ServerLinksDialog<I,
BB, IB, D, AB, T>
- All Known Implementing Classes:
PaperConfirmationDialog
,PaperDialog
,PaperDialogListDialog
,PaperMultiActionDialog
,PaperNoticeDialog
,PaperServerLinksDialog
,PEConfirmationDialog
,PEDialog
,PEDialogListDialog
,PEMultiActionDialog
,PENoticeDialog
,PEServerLinksDialog
,SpigotConfirmationDialog
,SpigotDialog
,SpigotDialogListDialog
,SpigotMultiActionDialog
,SpigotNoticeDialog
,SpigotServerLinksDialog
public interface Dialog<I,BB extends DialogBodyBuilder<I>,IB extends DialogInputBuilder,T extends Dialog<I,BB,IB,T>>
Interface representing a dialog.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
The action to be performed after an action is taken in the dialog. -
Method Summary
Modifier and TypeMethodDescriptionafterAction
(Dialog.AfterAction afterAction) Set the action to be performed after an action is taken in the dialogdefault T
body
(Collection<Consumer<BB>> bodyBuilders) Set the body of the dialog using a collection of body buildersSet the body of the dialogcanCloseWithEscape
(boolean canCloseWithEscape) Set the option to allow the dialog to be closed with the escape keyexternalTitle
(@Nullable String externalTitle) Set the external title of the dialog, which is used for displaying the dialog in a multi-dialog dialogSet the input for the dialogdefault T
Set the input for the dialog using a map of input buildersopener()
Create an opener for the dialogpause
(boolean pause) Set the option to pause the game while the dialog is openSet the title of the dialog
-
Method Details
-
title
Set the title of the dialog- 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
-
canCloseWithEscape
Set the option to allow the dialog to be closed with the escape key- Parameters:
canCloseWithEscape
- whether the dialog can be closed with the escape key- Returns:
- the dialog itself for method chaining
-
pause
Set the option to pause the game while the dialog is open- Parameters:
pause
- whether the dialog should pause the game- Returns:
- the dialog itself for method chaining
-
afterAction
Set the action to be performed after an action is taken in the dialog- Parameters:
afterAction
- the action to be performed after an action is taken- Returns:
- the dialog itself for method chaining
-
body
Set the body of the dialog- Parameters:
bodyBuilder
- the body builder for the dialog- Returns:
- the dialog itself for method chaining
-
input
Set the input for the dialog- Parameters:
key
- the key for the inputinputBuilder
- the input builder for the dialog- Returns:
- the dialog itself for method chaining
-
body
Set the body of the dialog using a collection of body builders- Parameters:
bodyBuilders
- the collection of body builders for the dialog- Returns:
- the dialog itself for method chaining
-
input
Set the input for the dialog using a map of input builders- Parameters:
inputBuilders
- the map of input builders for the dialog- Returns:
- the dialog itself for method chaining
-
opener
DialogOpener opener()Create an opener for the dialog- Returns:
- the dialog opener
-