Record Class SpigotDialogOpener

java.lang.Object
java.lang.Record
io.github.projectunified.unidialog.spigot.opener.SpigotDialogOpener
All Implemented Interfaces:
DialogOpener

public record SpigotDialogOpener(net.md_5.bungee.api.dialog.Dialog dialog) extends Record implements DialogOpener
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpigotDialogOpener(net.md_5.bungee.api.dialog.Dialog dialog)
    Creates an instance of a SpigotDialogOpener record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.md_5.bungee.api.dialog.Dialog
    Returns the value of the dialog record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    open(UUID uuid)
    Open the dialog for the given player UUID
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SpigotDialogOpener

      public SpigotDialogOpener(net.md_5.bungee.api.dialog.Dialog dialog)
      Creates an instance of a SpigotDialogOpener record class.
      Parameters:
      dialog - the value for the dialog record component
  • Method Details

    • open

      public boolean open(UUID uuid)
      Description copied from interface: DialogOpener
      Open the dialog for the given player UUID
      Specified by:
      open in interface DialogOpener
      Parameters:
      uuid - the UUID of the player to open the dialog for
      Returns:
      true if the dialog was opened successfully, false otherwise
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • dialog

      public net.md_5.bungee.api.dialog.Dialog dialog()
      Returns the value of the dialog record component.
      Returns:
      the value of the dialog record component