Record Class TooltipDisplay
java.lang.Object
java.lang.Record
net.minestom.server.item.component.TooltipDisplay
public record TooltipDisplay(boolean hideTooltip, Set<DataComponent<?>> hiddenComponents)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<TooltipDisplay> static final TooltipDisplaystatic final NetworkBuffer.Type<TooltipDisplay> -
Constructor Summary
ConstructorsConstructorDescriptionTooltipDisplay(boolean hideTooltip, Set<DataComponent<?>> hiddenComponents) Creates an instance of aTooltipDisplayrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Set<DataComponent<?>> Returns the value of thehiddenComponentsrecord component.booleanReturns the value of thehideTooltiprecord component.final StringtoString()Returns a string representation of this record class.with(DataComponent<?> component) withHideTooltip(boolean hide) without(DataComponent<?> component)
-
Field Details
-
EMPTY
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
TooltipDisplay
Creates an instance of aTooltipDisplayrecord class.- Parameters:
hideTooltip- the value for thehideTooltiprecord componenthiddenComponents- the value for thehiddenComponentsrecord component
-
-
Method Details
-
withHideTooltip
-
with
-
without
-
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. -
hideTooltip
public boolean hideTooltip()Returns the value of thehideTooltiprecord component.- Returns:
- the value of the
hideTooltiprecord component
-