Class DialogBase

java.lang.Object
net.md_5.bungee.api.dialog.DialogBase

public final class DialogBase extends Object
Represents the title and other options common to all dialogs.
  • Constructor Details

    • DialogBase

      public DialogBase(@NonNull @NonNull BaseComponent title)
    • DialogBase

      public DialogBase(@NonNull @NonNull BaseComponent title, BaseComponent externalTitle, List<DialogInput> inputs, List<DialogBody> body, Boolean canCloseWithEscape, Boolean pause, DialogBase.AfterAction afterAction)
      Creates a new DialogBase instance.
      Parameters:
      title - The mandatory dialog title.
      externalTitle - The name which is used for any buttons leading to this dialog (eg from a DialogListDialog). Otherwise defaults to title.
      inputs - The inputs to the dialog.
      body - The body elements which make up this dialog.
      canCloseWithEscape - Whether this dialog can be closed with the escape key (default: true).
      pause - Whether this dialog should pause the game in single-player mode (default: true).
      afterAction - Action to take after the a click or submit action is performed on the dialog (default: close).
  • Method Details

    • title

      @NonNull public @NonNull BaseComponent title()
      The mandatory dialog title.
    • externalTitle

      public BaseComponent externalTitle()
      The name which is used for any buttons leading to this dialog (eg from a DialogListDialog). Otherwise defaults to title.
    • inputs

      public List<DialogInput> inputs()
      The inputs to the dialog.
    • body

      public List<DialogBody> body()
      The body elements which make up this dialog.
    • canCloseWithEscape

      public Boolean canCloseWithEscape()
      Whether this dialog can be closed with the escape key (default: true).
    • pause

      public Boolean pause()
      Whether this dialog should pause the game in single-player mode (default: true).
    • afterAction

      public DialogBase.AfterAction afterAction()
      Action to take after the a click or submit action is performed on the dialog (default: close).
    • title

      public DialogBase title(@NonNull @NonNull BaseComponent title)
      The mandatory dialog title.
      Returns:
      this.
    • externalTitle

      public DialogBase externalTitle(BaseComponent externalTitle)
      The name which is used for any buttons leading to this dialog (eg from a DialogListDialog). Otherwise defaults to title.
      Returns:
      this.
    • inputs

      public DialogBase inputs(List<DialogInput> inputs)
      The inputs to the dialog.
      Returns:
      this.
    • body

      public DialogBase body(List<DialogBody> body)
      The body elements which make up this dialog.
      Returns:
      this.
    • canCloseWithEscape

      public DialogBase canCloseWithEscape(Boolean canCloseWithEscape)
      Whether this dialog can be closed with the escape key (default: true).
      Returns:
      this.
    • pause

      public DialogBase pause(Boolean pause)
      Whether this dialog should pause the game in single-player mode (default: true).
      Returns:
      this.
    • afterAction

      public DialogBase afterAction(DialogBase.AfterAction afterAction)
      Action to take after the a click or submit action is performed on the dialog (default: close).
      Returns:
      this.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object