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(BaseComponent title, BaseComponent externalTitle, List<DialogBody> body, boolean canCloseWithEscape)
      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.
      body - The body elements which make up this dialog.
      canCloseWithEscape - Whether this dialog can be closed with the escape key (default: true).
    • DialogBase

      public DialogBase(BaseComponent title)
      Creates a new DialogBase instance.
      Parameters:
      title - The mandatory dialog title.
  • Method Details

    • title

      public 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.
    • 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).
    • 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.
    • 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.
    • 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