Package net.minestom.server.dialog
Record Class DialogMetadata
java.lang.Object
java.lang.Record
net.minestom.server.dialog.DialogMetadata
public record DialogMetadata(@NotNull Component title, @Nullable Component externalTitle, boolean canCloseWithEscape, boolean pause, @NotNull DialogAfterAction afterAction, @NotNull List<DialogBody> body, @NotNull List<DialogInput> inputs)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDialogMetadata(@NotNull Component title, @Nullable Component externalTitle, boolean canCloseWithEscape, boolean pause, @NotNull DialogAfterAction afterAction, @NotNull List<DialogBody> body, @NotNull List<DialogInput> inputs) Creates an instance of aDialogMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull DialogAfterActionReturns the value of theafterActionrecord component.@NotNull List<DialogBody> body()Returns the value of thebodyrecord component.booleanReturns the value of thecanCloseWithEscaperecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable ComponentReturns the value of theexternalTitlerecord component.final inthashCode()Returns a hash code value for this object.@NotNull List<DialogInput> inputs()Returns the value of theinputsrecord component.booleanpause()Returns the value of thepauserecord component.@NotNull Componenttitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
DialogMetadata
public DialogMetadata(@NotNull @NotNull Component title, @Nullable @Nullable Component externalTitle, boolean canCloseWithEscape, boolean pause, @NotNull @NotNull DialogAfterAction afterAction, @NotNull @NotNull List<DialogBody> body, @NotNull @NotNull List<DialogInput> inputs) Creates an instance of aDialogMetadatarecord class.- Parameters:
title- the value for thetitlerecord componentexternalTitle- the value for theexternalTitlerecord componentcanCloseWithEscape- the value for thecanCloseWithEscaperecord componentpause- the value for thepauserecord componentafterAction- the value for theafterActionrecord componentbody- the value for thebodyrecord componentinputs- the value for theinputsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
externalTitle
Returns the value of theexternalTitlerecord component.- Returns:
- the value of the
externalTitlerecord component
-
canCloseWithEscape
public boolean canCloseWithEscape()Returns the value of thecanCloseWithEscaperecord component.- Returns:
- the value of the
canCloseWithEscaperecord component
-
pause
public boolean pause()Returns the value of thepauserecord component.- Returns:
- the value of the
pauserecord component
-
afterAction
Returns the value of theafterActionrecord component.- Returns:
- the value of the
afterActionrecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
inputs
Returns the value of theinputsrecord component.- Returns:
- the value of the
inputsrecord component
-