Class SpigotDialogManager
java.lang.Object
io.github.projectunified.unidialog.spigot.SpigotDialogManager
- All Implemented Interfaces:
BungeeDialogManager
,DialogManager<Object,
,BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?>, BungeeDialogActionBuilder> org.bukkit.event.Listener
public class SpigotDialogManager
extends Object
implements BungeeDialogManager, org.bukkit.event.Listener
-
Constructor Summary
ConstructorsConstructorDescriptionSpigotDialogManager
(org.bukkit.plugin.Plugin plugin) SpigotDialogManager
(org.bukkit.plugin.Plugin plugin, String defaultNamespace) -
Method Summary
Modifier and TypeMethodDescriptionboolean
clearDialog
(UUID uuid) Clear the current dialog associated with the given player UUID.getDialogOpener
(net.md_5.bungee.api.dialog.Dialog dialog) void
onCustomClick
(org.bukkit.event.player.PlayerCustomClickEvent event) void
register()
Register the dialog managervoid
registerCustomAction
(String namespace, String id, BiConsumer<UUID, Map<String, String>> action) Register a custom action with a namespace and a unique identifier.void
registerCustomAction
(String id, BiConsumer<UUID, Map<String, String>> action) Register a custom action with a unique identifier.void
Unregister the dialog managervoid
Unregister all custom actions.void
Unregister a custom action by its unique identifier.void
unregisterCustomAction
(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, wait
Methods inherited from interface io.github.projectunified.unidialog.bungeecord.BungeeDialogManager
createConfirmationDialog, createDialogListDialog, createMultiActionDialog, createNoticeDialog, createServerLinksDialog
-
Constructor Details
-
SpigotDialogManager
-
SpigotDialogManager
public SpigotDialogManager(org.bukkit.plugin.Plugin plugin)
-
-
Method Details
-
getDefaultNamespace
- Specified by:
getDefaultNamespace
in interfaceBungeeDialogManager
-
getDialogOpener
- Specified by:
getDialogOpener
in interfaceBungeeDialogManager
-
register
public void register()Description copied from interface:DialogManager
Register the dialog manager- Specified by:
register
in interfaceDialogManager<Object,
BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?>, BungeeDialogActionBuilder>
-
unregister
public void unregister()Description copied from interface:DialogManager
Unregister the dialog manager- Specified by:
unregister
in interfaceDialogManager<Object,
BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?>, BungeeDialogActionBuilder>
-
onCustomClick
public void onCustomClick(org.bukkit.event.player.PlayerCustomClickEvent event) -
registerCustomAction
Description copied from interface:DialogManager
Register a custom action with a unique identifier.- Specified by:
registerCustomAction
in interfaceDialogManager<Object,
BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?>, BungeeDialogActionBuilder> - Parameters:
id
- the unique identifier for the custom actionaction
- the action to be executed, taking a UUID and a map of parameters
-
registerCustomAction
public void registerCustomAction(String namespace, String id, BiConsumer<UUID, Map<String, String>> action) Description copied from interface:DialogManager
Register a custom action with a namespace and a unique identifier.- Specified by:
registerCustomAction
in interfaceDialogManager<Object,
BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?>, BungeeDialogActionBuilder> - Parameters:
namespace
- the namespace for the custom actionid
- the unique identifier for the custom actionaction
- the action to be executed, taking a UUID and a map of parameters
-
unregisterCustomAction
Description copied from interface:DialogManager
Unregister a custom action by its unique identifier.- Specified by:
unregisterCustomAction
in interfaceDialogManager<Object,
BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?>, BungeeDialogActionBuilder> - Parameters:
id
- the unique identifier of the custom action to be unregistered
-
unregisterCustomAction
Description copied from interface:DialogManager
Unregister a custom action by its namespace and unique identifier.- Specified by:
unregisterCustomAction
in 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:DialogManager
Unregister all custom actions.- Specified by:
unregisterAllCustomActions
in interfaceDialogManager<Object,
BungeeDialogBodyBuilder, BungeeDialogInputBuilder, BungeeDialog<?>, BungeeDialogActionBuilder>
-
clearDialog
Description copied from interface:DialogManager
Clear the current dialog associated with the given player UUID.- Specified by:
clearDialog
in 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
-