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 aDialogMetadata
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull DialogAfterAction
Returns the value of theafterAction
record component.@NotNull List
<DialogBody> body()
Returns the value of thebody
record component.boolean
Returns the value of thecanCloseWithEscape
record component.final boolean
Indicates whether some other object is "equal to" this one.@Nullable Component
Returns the value of theexternalTitle
record component.final int
hashCode()
Returns a hash code value for this object.@NotNull List
<DialogInput> inputs()
Returns the value of theinputs
record component.boolean
pause()
Returns the value of thepause
record component.@NotNull Component
title()
Returns the value of thetitle
record component.final String
toString()
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 aDialogMetadata
record class.- Parameters:
title
- the value for thetitle
record componentexternalTitle
- the value for theexternalTitle
record componentcanCloseWithEscape
- the value for thecanCloseWithEscape
record componentpause
- the value for thepause
record componentafterAction
- the value for theafterAction
record componentbody
- the value for thebody
record componentinputs
- the value for theinputs
record 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 thetitle
record component.- Returns:
- the value of the
title
record component
-
externalTitle
Returns the value of theexternalTitle
record component.- Returns:
- the value of the
externalTitle
record component
-
canCloseWithEscape
public boolean canCloseWithEscape()Returns the value of thecanCloseWithEscape
record component.- Returns:
- the value of the
canCloseWithEscape
record component
-
pause
public boolean pause()Returns the value of thepause
record component.- Returns:
- the value of the
pause
record component
-
afterAction
Returns the value of theafterAction
record component.- Returns:
- the value of the
afterAction
record component
-
body
Returns the value of thebody
record component.- Returns:
- the value of the
body
record component
-
inputs
Returns the value of theinputs
record component.- Returns:
- the value of the
inputs
record component
-