Interface DialogManager<I,BB extends DialogBodyBuilder<I>,IB extends DialogInputBuilder,D extends Dialog<I,BB,IB,?>,AB extends DialogActionBuilder<D,AB>>

Type Parameters:
I - the type of the item for the item body
BB - the type of the dialog body builder
IB - the type of the dialog input builder
D - the type of the base dialog
AB - the type of the dialog action builder
All Known Implementing Classes:
PaperDialogManager, PocketEventsDialogManager, SpigotDialogManager

public interface DialogManager<I,BB extends DialogBodyBuilder<I>,IB extends DialogInputBuilder,D extends Dialog<I,BB,IB,?>,AB extends DialogActionBuilder<D,AB>>
The main interface for managing dialogs in the UniDialog framework. It provides methods to create different types of dialogs, register and unregister custom actions, and manage dialog instances. This interface is generic and can be used with various types of dialog builders and input builders.
  • Method Details

    • createConfirmationDialog

      <T extends ConfirmationDialog<I, BB, IB, D, AB, T>> T createConfirmationDialog()
      Create a confirmation dialog
      Type Parameters:
      T - the type of the confirmation dialog, extending ConfirmationDialog
      Returns:
      a new instance of ConfirmationDialog
    • createMultiActionDialog

      <T extends MultiActionDialog<I, BB, IB, D, AB, T>> T createMultiActionDialog()
      Create a multi-action dialog
      Type Parameters:
      T - the type of the multi-action dialog, extending MultiActionDialog
      Returns:
      a new instance of MultiActionDialog
    • createServerLinksDialog

      <T extends ServerLinksDialog<I, BB, IB, D, AB, T>> T createServerLinksDialog()
      Create a server links dialog
      Type Parameters:
      T - the type of the server links dialog, extending ServerLinksDialog
      Returns:
      a new instance of ServerLinksDialog
    • createNoticeDialog

      <T extends NoticeDialog<I, BB, IB, D, AB, T>> T createNoticeDialog()
      Create a notice dialog
      Type Parameters:
      T - the type of the notice dialog, extending NoticeDialog
      Returns:
      a new instance of NoticeDialog
    • createDialogListDialog

      <T extends DialogListDialog<I, BB, IB, D, AB, T>> T createDialogListDialog()
      Create a dialog list dialog
      Type Parameters:
      T - the type of the dialog list dialog, extending DialogListDialog
      Returns:
      a new instance of DialogListDialog
    • register

      void register()
      Register the dialog manager
    • unregister

      void unregister()
      Unregister the dialog manager
    • registerCustomAction

      void registerCustomAction(String id, BiConsumer<UUID,Map<String,String>> action)
      Register a custom action with a unique identifier.
      Parameters:
      id - the unique identifier for the custom action
      action - the action to be executed, taking a UUID and a map of parameters
    • registerCustomAction

      void registerCustomAction(String namespace, String id, BiConsumer<UUID,Map<String,String>> action)
      Register a custom action with a namespace and a unique identifier.
      Parameters:
      namespace - the namespace for the custom action
      id - the unique identifier for the custom action
      action - the action to be executed, taking a UUID and a map of parameters
    • unregisterCustomAction

      void unregisterCustomAction(String id)
      Unregister a custom action by its unique identifier.
      Parameters:
      id - the unique identifier of the custom action to be unregistered
    • unregisterCustomAction

      void unregisterCustomAction(String namespace, String id)
      Unregister a custom action by its namespace and unique identifier.
      Parameters:
      namespace - the namespace of the custom action
      id - the unique identifier of the custom action to be unregistered
    • unregisterAllCustomActions

      void unregisterAllCustomActions()
      Unregister all custom actions.
    • clearDialog

      boolean clearDialog(UUID uuid)
      Clear the current dialog associated with the given player UUID.
      Parameters:
      uuid - the unique identifier of the player whose dialog should be cleared
      Returns:
      true if the dialog was successfully cleared, false otherwise