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.with
(DataComponent<?> component) withHideTooltip
(boolean hide) without
(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
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 '=='. -
hideTooltip
public boolean hideTooltip()Returns the value of thehideTooltip
record component.- Returns:
- the value of the
hideTooltip
record component
-