Record Class PaperDialogOpener
java.lang.Object
java.lang.Record
io.github.projectunified.unidialog.paper.opener.PaperDialogOpener
- All Implemented Interfaces:
io.github.projectunified.unidialog.core.opener.DialogOpener
public record PaperDialogOpener(io.papermc.paper.dialog.Dialog dialog)
extends Record
implements io.github.projectunified.unidialog.core.opener.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.booleanvoidopen(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
- Specified by:
openin interfaceio.github.projectunified.unidialog.core.opener.DialogOpener
-
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
-