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>
  • Constructor Details

    • SpigotDialog

      public SpigotDialog(String defaultNamespace)
  • Method Details

    • title

      public T title(net.md_5.bungee.api.chat.BaseComponent title)
      Set the title of the dialog
      Parameters:
      title - the title of the dialog
      Returns:
      the dialog itself for method chaining
    • title

      public T title(String title)
      Description copied from interface: Dialog
      Set the title of the dialog
      Specified by:
      title in interface Dialog<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

      public T externalTitle(@Nullable @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 dialog
      Parameters:
      externalTitle - the external title of the dialog
      Returns:
      the dialog itself for method chaining
    • externalTitle

      public T externalTitle(@Nullable @Nullable String 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 interface Dialog<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

      public T canCloseWithEscape(boolean canCloseWithEscape)
      Description copied from interface: Dialog
      Set the option to allow the dialog to be closed with the escape key
      Specified by:
      canCloseWithEscape in interface Dialog<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

      public T pause(boolean pause)
      Description copied from interface: Dialog
      Set the option to pause the game while the dialog is open
      Specified by:
      pause in interface Dialog<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

      public T afterAction(Dialog.AfterAction afterAction)
      Description copied from interface: Dialog
      Set the action to be performed after an action is taken in the dialog
      Specified by:
      afterAction in interface Dialog<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

      public T body(Consumer<SpigotDialogBodyBuilder> bodyBuilder)
      Description copied from interface: Dialog
      Set the body of the dialog
      Specified by:
      body in interface Dialog<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

      public T input(String key, Consumer<SpigotDialogInputBuilder> inputBuilder)
      Description copied from interface: Dialog
      Set the input for the dialog
      Specified by:
      input in interface Dialog<org.bukkit.inventory.ItemStack,SpigotDialogBodyBuilder,SpigotDialogInputBuilder,T extends SpigotDialog<T>>
      Parameters:
      key - the key for the input
      inputBuilder - 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

      public SpigotDialogOpener opener()
      Description copied from interface: Dialog
      Create an opener for the dialog
      Specified by:
      opener in interface Dialog<org.bukkit.inventory.ItemStack,SpigotDialogBodyBuilder,SpigotDialogInputBuilder,T extends SpigotDialog<T>>
      Returns:
      the dialog opener