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 TooltipDisplay
static final NetworkBuffer.Type
<TooltipDisplay> -
Constructor Summary
ConstructorsConstructorDescriptionTooltipDisplay
(boolean hideTooltip, Set<DataComponent<?>> hiddenComponents) Creates an instance of aTooltipDisplay
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Set
<DataComponent<?>> Returns the value of thehiddenComponents
record component.boolean
Returns the value of thehideTooltip
record component.final String
toString()
Returns a string representation of this record class.@NotNull TooltipDisplay
with
(@NotNull DataComponent<?> component) @NotNull TooltipDisplay
withHideTooltip
(boolean hide) @NotNull TooltipDisplay
without
(@NotNull DataComponent<?> component)
-
Field Details
-
EMPTY
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
TooltipDisplay
Creates an instance of aTooltipDisplay
record class.- Parameters:
hideTooltip
- the value for thehideTooltip
record componenthiddenComponents
- the value for thehiddenComponents
record 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 thecompare
method from their corresponding wrapper classes. -
hideTooltip
public boolean hideTooltip()Returns the value of thehideTooltip
record component.- Returns:
- the value of the
hideTooltip
record component
-