Record Class PaperDialogOpener
java.lang.Object
java.lang.Record
io.github.projectunified.unidialog.paper.opener.PaperDialogOpener
- All Implemented Interfaces:
DialogOpener
public record PaperDialogOpener(io.papermc.paper.dialog.Dialog dialog)
extends Record
implements DialogOpener
-
Constructor Summary
ConstructorsConstructorDescriptionPaperDialogOpener(io.papermc.paper.dialog.Dialog dialog) Creates an instance of aPaperDialogOpenerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionio.papermc.paper.dialog.Dialogdialog()Returns the value of thedialogrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanOpen the dialog for the given player UUIDvoidopen(net.kyori.adventure.audience.Audience audience) Open a dialog for a specific audiencefinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PaperDialogOpener
public PaperDialogOpener(io.papermc.paper.dialog.Dialog dialog) Creates an instance of aPaperDialogOpenerrecord class.- Parameters:
dialog- the value for thedialogrecord component
-
-
Method Details
-
open
public void open(net.kyori.adventure.audience.Audience audience) Open a dialog for a specific audience- Parameters:
audience- the audience to open the dialog for
-
open
Description copied from interface:DialogOpenerOpen the dialog for the given player UUID- Specified by:
openin interfaceDialogOpener- Parameters:
uuid- the UUID of the player to open the dialog for- Returns:
- true if the dialog was opened successfully, false otherwise
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
dialog
public io.papermc.paper.dialog.Dialog dialog()Returns the value of thedialogrecord component.- Returns:
- the value of the
dialogrecord component
-