Class ConfirmationDialog

java.lang.Object
net.md_5.bungee.api.dialog.ConfirmationDialog
All Implemented Interfaces:
Dialog

public final class ConfirmationDialog extends Object implements Dialog
Represents a simple dialog with text and two actions at the bottom (default: "yes", "no").
  • Constructor Details

    • ConfirmationDialog

      public ConfirmationDialog(@NonNull @NonNull DialogBase base)
    • ConfirmationDialog

      public ConfirmationDialog(@NonNull @NonNull DialogBase base, ActionButton yes, ActionButton no)
      Creates a new ConfirmationDialog instance.
      Parameters:
      base -
      yes - The "yes" click action / bottom (appears on the left).
      no - The "no" click action / bottom (appears on the right).
  • Method Details

    • getBase

      @NonNull public @NonNull DialogBase getBase()
      Description copied from interface: Dialog
      Gets the dialog base which contains the dialog title and other options common to all types of dialogs.
      Specified by:
      getBase in interface Dialog
      Returns:
      mutable reference to the dialog base
    • yes

      public ActionButton yes()
      The "yes" click action / bottom (appears on the left).
    • no

      public ActionButton no()
      The "no" click action / bottom (appears on the right).
    • setBase

      public void setBase(@NonNull @NonNull DialogBase base)
      Description copied from interface: Dialog
      Sets the dialog base.
      For internal use only as this is mandatory and should be specified in the constructor.
      Specified by:
      setBase in interface Dialog
      Parameters:
      base - the new dialog base
    • yes

      public ConfirmationDialog yes(ActionButton yes)
      The "yes" click action / bottom (appears on the left).
      Returns:
      this.
    • no

      The "no" click action / bottom (appears on the right).
      Returns:
      this.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object