Class SpigotDialogManager
java.lang.Object
io.github.projectunified.unidialog.spigot.SpigotDialogManager
- All Implemented Interfaces:
DialogManager<Object,,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder> org.bukkit.event.Listener
public class SpigotDialogManager
extends Object
implements DialogManager<Object,BungeeDialogBodyBuilder,BungeeDialogInputBuilder,BungeeDialog<?,?>,BungeeDialogActionBuilder>, org.bukkit.event.Listener
-
Constructor Summary
ConstructorsConstructorDescriptionSpigotDialogManager(org.bukkit.plugin.Plugin plugin) SpigotDialogManager(org.bukkit.plugin.Plugin plugin, String defaultNamespace) -
Method Summary
Modifier and TypeMethodDescriptionbooleanclearDialog(UUID uuid) Clear the current dialog associated with the given player UUID.Create a confirmation dialogCreate a dialog list dialogCreate a multi-action dialogCreate a notice dialogCreate a server links dialogvoidonCustomClick(org.bukkit.event.player.PlayerCustomClickEvent event) voidregister()Register the dialog managervoidregisterCustomAction(String namespace, String id, Consumer<DialogPayload> action) Register a custom action with a unique identifier.voidregisterCustomAction(String id, Consumer<DialogPayload> action) Register a custom action with a unique identifier.voidUnregister the dialog managervoidUnregister all custom actions.voidUnregister a custom action by its unique identifier.voidunregisterCustomAction(String namespace, String id) Unregister a custom action by its namespace and unique identifier.Methods 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.DialogManager
registerCustomAction, registerCustomAction
-
Constructor Details
-
SpigotDialogManager
-
SpigotDialogManager
public SpigotDialogManager(org.bukkit.plugin.Plugin plugin)
-
-
Method Details
-
createConfirmationDialog
Description copied from interface:DialogManagerCreate a confirmation dialog- Specified by:
createConfirmationDialogin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder> - Returns:
- a new instance of ConfirmationDialog
-
createMultiActionDialog
Description copied from interface:DialogManagerCreate a multi-action dialog- Specified by:
createMultiActionDialogin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder> - Returns:
- a new instance of MultiActionDialog
-
createServerLinksDialog
Description copied from interface:DialogManagerCreate a server links dialog- Specified by:
createServerLinksDialogin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder> - Returns:
- a new instance of ServerLinksDialog
-
createNoticeDialog
Description copied from interface:DialogManagerCreate a notice dialog- Specified by:
createNoticeDialogin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder> - Returns:
- a new instance of NoticeDialog
-
createDialogListDialog
Description copied from interface:DialogManagerCreate a dialog list dialog- Specified by:
createDialogListDialogin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder> - Returns:
- a new instance of DialogListDialog
-
register
public void register()Description copied from interface:DialogManagerRegister the dialog manager- Specified by:
registerin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder>
-
unregister
public void unregister()Description copied from interface:DialogManagerUnregister the dialog manager- Specified by:
unregisterin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder>
-
onCustomClick
public void onCustomClick(org.bukkit.event.player.PlayerCustomClickEvent event) -
registerCustomAction
Description copied from interface:DialogManagerRegister a custom action with a unique identifier.- Specified by:
registerCustomActionin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder> - Parameters:
id- the unique identifier for the custom actionaction- the action to be executed, taking a payload
-
registerCustomAction
Description copied from interface:DialogManagerRegister a custom action with a unique identifier.- Specified by:
registerCustomActionin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder> - Parameters:
id- the unique identifier for the custom actionaction- the action to be executed, taking a payload
-
unregisterCustomAction
Description copied from interface:DialogManagerUnregister a custom action by its unique identifier.- Specified by:
unregisterCustomActionin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder> - Parameters:
id- the unique identifier of the custom action to be unregistered
-
unregisterCustomAction
Description copied from interface:DialogManagerUnregister a custom action by its namespace and unique identifier.- Specified by:
unregisterCustomActionin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder> - Parameters:
namespace- the namespace of the custom actionid- the unique identifier of the custom action to be unregistered
-
unregisterAllCustomActions
public void unregisterAllCustomActions()Description copied from interface:DialogManagerUnregister all custom actions.- Specified by:
unregisterAllCustomActionsin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder>
-
clearDialog
Description copied from interface:DialogManagerClear the current dialog associated with the given player UUID.- Specified by:
clearDialogin interfaceDialogManager<Object,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?, ?>, BungeeDialogActionBuilder> - Parameters:
uuid- the unique identifier of the player whose dialog should be cleared- Returns:
- true if the dialog was successfully cleared, false otherwise
-