Record Class AdvancementsPacket.DisplayData
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.AdvancementsPacket.DisplayData
- All Implemented Interfaces:
net.minestom.server.adventure.ComponentHolder<AdvancementsPacket.DisplayData>,NetworkBuffer.Writer
- Enclosing class:
AdvancementsPacket
public static record AdvancementsPacket.DisplayData(@NotNull Component title, @NotNull Component description, @NotNull ItemStack icon, @NotNull FrameType frameType, int flags, @Nullable String backgroundTexture, float x, float y)
extends Record
implements NetworkBuffer.Writer, net.minestom.server.adventure.ComponentHolder<AdvancementsPacket.DisplayData>
-
Constructor Summary
ConstructorsConstructorDescriptionDisplayData(@NotNull Component title, @NotNull Component description, @NotNull ItemStack icon, @NotNull FrameType frameType, int flags, @Nullable String backgroundTexture, float x, float y) Creates an instance of aDisplayDatarecord class.DisplayData(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of thebackgroundTexturerecord component.@NotNull Collection<Component> @NotNull AdvancementsPacket.DisplayDatacopyWithOperator(@NotNull UnaryOperator<Component> operator) @NotNull ComponentReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.intflags()Returns the value of theflagsrecord component.@NotNull FrameTypeReturns the value of theframeTyperecord component.final inthashCode()Returns a hash code value for this object.@NotNull ItemStackicon()Returns the value of theiconrecord component.@NotNull Componenttitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.voidwrite(@NotNull NetworkBuffer writer) floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minestom.server.adventure.ComponentHolder
visitComponents
-
Constructor Details
-
DisplayData
-
DisplayData
public DisplayData(@NotNull @NotNull Component title, @NotNull @NotNull Component description, @NotNull @NotNull ItemStack icon, @NotNull @NotNull FrameType frameType, int flags, @Nullable @Nullable String backgroundTexture, float x, float y) Creates an instance of aDisplayDatarecord class.- Parameters:
title- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componenticon- the value for theiconrecord componentframeType- the value for theframeTyperecord componentflags- the value for theflagsrecord componentbackgroundTexture- the value for thebackgroundTexturerecord componentx- the value for thexrecord componenty- the value for theyrecord component
-
-
Method Details
-
write
- Specified by:
writein interfaceNetworkBuffer.Writer
-
components
- Specified by:
componentsin interfacenet.minestom.server.adventure.ComponentHolder<AdvancementsPacket.DisplayData>
-
copyWithOperator
@NotNull public @NotNull AdvancementsPacket.DisplayData copyWithOperator(@NotNull @NotNull UnaryOperator<Component> operator) - Specified by:
copyWithOperatorin interfacenet.minestom.server.adventure.ComponentHolder<AdvancementsPacket.DisplayData>
-
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 thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
frameType
Returns the value of theframeTyperecord component.- Returns:
- the value of the
frameTyperecord component
-
flags
public int flags()Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-
backgroundTexture
Returns the value of thebackgroundTexturerecord component.- Returns:
- the value of the
backgroundTexturerecord component
-
x
public float x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public float y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-