Interface Dialog<I,BB extends DialogBodyBuilder<I>,IB extends DialogInputBuilder,T extends Dialog<I,BB,IB,T>>

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
T - the type of the dialog itself, for method chaining
All Known Subinterfaces:
AdventureDialog<I,BB,IB,T>, ConfirmationDialog<I,BB,IB,D,AB,T>, DialogListDialog<I,BB,IB,D,AB,T>, MultiActionDialog<I,BB,IB,D,AB,T>, NoticeDialog<I,BB,IB,D,AB,T>, ServerLinksDialog<I,BB,IB,D,AB,T>
All Known Implementing Classes:
PaperConfirmationDialog, PaperDialog, PaperDialogListDialog, PaperMultiActionDialog, PaperNoticeDialog, PaperServerLinksDialog, PEConfirmationDialog, PEDialog, PEDialogListDialog, PEMultiActionDialog, PENoticeDialog, PEServerLinksDialog, SpigotConfirmationDialog, SpigotDialog, SpigotDialogListDialog, SpigotMultiActionDialog, SpigotNoticeDialog, SpigotServerLinksDialog

public interface Dialog<I,BB extends DialogBodyBuilder<I>,IB extends DialogInputBuilder,T extends Dialog<I,BB,IB,T>>
Interface representing a dialog.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The action to be performed after an action is taken in the dialog.
  • Method Summary

    Modifier and Type
    Method
    Description
    Set the action to be performed after an action is taken in the dialog
    default T
    body(Collection<Consumer<BB>> bodyBuilders)
    Set the body of the dialog using a collection of body builders
    body(Consumer<BB> bodyBuilder)
    Set the body of the dialog
    canCloseWithEscape(boolean canCloseWithEscape)
    Set the option to allow the dialog to be closed with the escape key
    externalTitle(@Nullable String externalTitle)
    Set the external title of the dialog, which is used for displaying the dialog in a multi-dialog dialog
    input(String key, Consumer<IB> inputBuilder)
    Set the input for the dialog
    default T
    input(Map<String,Consumer<IB>> inputBuilders)
    Set the input for the dialog using a map of input builders
    Create an opener for the dialog
    pause(boolean pause)
    Set the option to pause the game while the dialog is open
    title(String title)
    Set the title of the dialog
  • Method Details

    • title

      T title(String title)
      Set the title of the dialog
      Parameters:
      title - the title of the dialog
      Returns:
      the dialog itself for method chaining
    • externalTitle

      T externalTitle(@Nullable @Nullable String 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
    • canCloseWithEscape

      T canCloseWithEscape(boolean canCloseWithEscape)
      Set the option to allow the dialog to be closed with the escape key
      Parameters:
      canCloseWithEscape - whether the dialog can be closed with the escape key
      Returns:
      the dialog itself for method chaining
    • pause

      T pause(boolean pause)
      Set the option to pause the game while the dialog is open
      Parameters:
      pause - whether the dialog should pause the game
      Returns:
      the dialog itself for method chaining
    • afterAction

      T afterAction(Dialog.AfterAction afterAction)
      Set the action to be performed after an action is taken in the dialog
      Parameters:
      afterAction - the action to be performed after an action is taken
      Returns:
      the dialog itself for method chaining
    • body

      T body(Consumer<BB> bodyBuilder)
      Set the body of the dialog
      Parameters:
      bodyBuilder - the body builder for the dialog
      Returns:
      the dialog itself for method chaining
    • input

      T input(String key, Consumer<IB> inputBuilder)
      Set the input for the dialog
      Parameters:
      key - the key for the input
      inputBuilder - the input builder for the dialog
      Returns:
      the dialog itself for method chaining
    • body

      default T body(Collection<Consumer<BB>> bodyBuilders)
      Set the body of the dialog using a collection of body builders
      Parameters:
      bodyBuilders - the collection of body builders for the dialog
      Returns:
      the dialog itself for method chaining
    • input

      default T input(Map<String,Consumer<IB>> inputBuilders)
      Set the input for the dialog using a map of input builders
      Parameters:
      inputBuilders - the map of input builders for the dialog
      Returns:
      the dialog itself for method chaining
    • opener

      DialogOpener opener()
      Create an opener for the dialog
      Returns:
      the dialog opener