Class SpigotDialog<T extends SpigotDialog<T>>
java.lang.Object
io.github.projectunified.unidialog.spigot.dialog.SpigotDialog<T>
- All Implemented Interfaces:
Dialog<org.bukkit.inventory.ItemStack,
SpigotDialogBodyBuilder, SpigotDialogInputBuilder, T>
- Direct Known Subclasses:
SpigotConfirmationDialog
,SpigotDialogListDialog
,SpigotMultiActionDialog
,SpigotNoticeDialog
,SpigotServerLinksDialog
public abstract class SpigotDialog<T extends SpigotDialog<T>>
extends Object
implements Dialog<org.bukkit.inventory.ItemStack,SpigotDialogBodyBuilder,SpigotDialogInputBuilder,T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.projectunified.unidialog.core.dialog.Dialog
Dialog.AfterAction
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionafterAction
(Dialog.AfterAction afterAction) Set the action to be performed after an action is taken in the dialogbody
(Consumer<SpigotDialogBodyBuilder> 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.Dialog
constructDialog
(net.md_5.bungee.api.dialog.DialogBase dialogBase) externalTitle
(@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.ActionButton
getAction
(Consumer<SpigotDialogActionBuilder> action) final net.md_5.bungee.api.dialog.Dialog
input
(String key, Consumer<SpigotDialogInputBuilder> 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
-
SpigotDialog
-
-
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:Dialog
Set the title of the dialog- Specified by:
title
in interfaceDialog<org.bukkit.inventory.ItemStack,
SpigotDialogBodyBuilder, SpigotDialogInputBuilder, T extends SpigotDialog<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:Dialog
Set the external title of the dialog, which is used for displaying the dialog in a multi-dialog dialog- Specified by:
externalTitle
in interfaceDialog<org.bukkit.inventory.ItemStack,
SpigotDialogBodyBuilder, SpigotDialogInputBuilder, T extends SpigotDialog<T>> - Parameters:
externalTitle
- the external title of the dialog- Returns:
- the dialog itself for method chaining
-
canCloseWithEscape
Description copied from interface:Dialog
Set the option to allow the dialog to be closed with the escape key- Specified by:
canCloseWithEscape
in interfaceDialog<org.bukkit.inventory.ItemStack,
SpigotDialogBodyBuilder, SpigotDialogInputBuilder, T extends SpigotDialog<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:Dialog
Set the option to pause the game while the dialog is open- Specified by:
pause
in interfaceDialog<org.bukkit.inventory.ItemStack,
SpigotDialogBodyBuilder, SpigotDialogInputBuilder, T extends SpigotDialog<T>> - Parameters:
pause
- whether the dialog should pause the game- Returns:
- the dialog itself for method chaining
-
afterAction
Description copied from interface:Dialog
Set the action to be performed after an action is taken in the dialog- Specified by:
afterAction
in interfaceDialog<org.bukkit.inventory.ItemStack,
SpigotDialogBodyBuilder, SpigotDialogInputBuilder, T extends SpigotDialog<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:Dialog
Set the body of the dialog- Specified by:
body
in interfaceDialog<org.bukkit.inventory.ItemStack,
SpigotDialogBodyBuilder, SpigotDialogInputBuilder, T extends SpigotDialog<T>> - Parameters:
bodyBuilder
- the body builder for the dialog- Returns:
- the dialog itself for method chaining
-
input
Description copied from interface:Dialog
Set the input for the dialog- Specified by:
input
in interfaceDialog<org.bukkit.inventory.ItemStack,
SpigotDialogBodyBuilder, SpigotDialogInputBuilder, T extends SpigotDialog<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<SpigotDialogActionBuilder> action) -
constructDialog
protected abstract net.md_5.bungee.api.dialog.Dialog constructDialog(net.md_5.bungee.api.dialog.DialogBase dialogBase) -
getDialog
public final net.md_5.bungee.api.dialog.Dialog getDialog() -
opener
Description copied from interface:Dialog
Create an opener for the dialog- Specified by:
opener
in interfaceDialog<org.bukkit.inventory.ItemStack,
SpigotDialogBodyBuilder, SpigotDialogInputBuilder, T extends SpigotDialog<T>> - Returns:
- the dialog opener
-