Record Class NbtQueryResponsePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.NbtQueryResponsePacket
- All Implemented Interfaces:
SendablePacket
,ServerPacket
,ServerPacket.Play
public record NbtQueryResponsePacket(int transactionId, net.kyori.adventure.nbt.CompoundBinaryTag data)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.network.packet.server.ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNbtQueryResponsePacket
(int transactionId, net.kyori.adventure.nbt.CompoundBinaryTag data) Creates an instance of aNbtQueryResponsePacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionnet.kyori.adventure.nbt.CompoundBinaryTag
data()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.int
Returns the value of thetransactionId
record component.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
NbtQueryResponsePacket
public NbtQueryResponsePacket(int transactionId, net.kyori.adventure.nbt.CompoundBinaryTag data) Creates an instance of aNbtQueryResponsePacket
record class.- Parameters:
transactionId
- the value for thetransactionId
record componentdata
- the value for thedata
record component
-
-
Method Details
-
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. -
transactionId
public int transactionId()Returns the value of thetransactionId
record component.- Returns:
- the value of the
transactionId
record component
-
data
public net.kyori.adventure.nbt.CompoundBinaryTag data()Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-