Record Class DialogBody.Item
java.lang.Object
java.lang.Record
net.minestom.server.dialog.DialogBody.Item
- All Implemented Interfaces:
DialogBody
- Enclosing interface:
DialogBody
public static record DialogBody.Item(ItemStack itemStack, @Nullable DialogBody.PlainMessage description, boolean showDecoration, boolean showTooltip, int width, int height)
extends Record
implements DialogBody
-
Nested Class Summary
Nested classes/interfaces inherited from interface DialogBody
DialogBody.Item, DialogBody.PlainMessage -
Field Summary
FieldsFields inherited from interface DialogBody
REGISTRY -
Constructor Summary
ConstructorsConstructorDescriptionItem(ItemStack itemStack, @Nullable DialogBody.PlainMessage description, boolean showDecoration, boolean showTooltip, int width, int height) Creates an instance of aItemrecord class. -
Method Summary
Modifier and TypeMethodDescriptionStructCodec<? extends DialogBody> codec()Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.Returns the value of theitemStackrecord component.booleanReturns the value of theshowDecorationrecord component.booleanReturns the value of theshowTooltiprecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Item
public Item(ItemStack itemStack, @Nullable @Nullable DialogBody.PlainMessage description, boolean showDecoration, boolean showTooltip, int width, int height) Creates an instance of aItemrecord class.- Parameters:
itemStack- the value for theitemStackrecord componentdescription- the value for thedescriptionrecord componentshowDecoration- the value for theshowDecorationrecord componentshowTooltip- the value for theshowTooltiprecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceDialogBody
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
itemStack
Returns the value of theitemStackrecord component.- Returns:
- the value of the
itemStackrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
showDecoration
public boolean showDecoration()Returns the value of theshowDecorationrecord component.- Returns:
- the value of the
showDecorationrecord component
-
showTooltip
public boolean showTooltip()Returns the value of theshowTooltiprecord component.- Returns:
- the value of the
showTooltiprecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-