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 aPaperDialogOpener
record class. -
Method Summary
Modifier and TypeMethodDescriptionio.papermc.paper.dialog.Dialog
dialog()
Returns the value of thedialog
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Open the dialog for the given player UUIDvoid
open
(net.kyori.adventure.audience.Audience audience) Open a dialog for a specific audiencefinal String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PaperDialogOpener
public PaperDialogOpener(io.papermc.paper.dialog.Dialog dialog) Creates an instance of aPaperDialogOpener
record class.- Parameters:
dialog
- the value for thedialog
record 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:DialogOpener
Open the dialog for the given player UUID- Specified by:
open
in 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 thedialog
record component.- Returns:
- the value of the
dialog
record component
-