Record Class BufferedPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.BufferedPacket
- All Implemented Interfaces:
SendablePacket
@Internal
public record BufferedPacket(NetworkBuffer buffer, long index, long length)
extends Record
implements SendablePacket
Represents a buffer to directly write to the network.
May contain multiple packets.
-
Constructor Summary
ConstructorsConstructorDescriptionBufferedPacket(NetworkBuffer buffer, long index, long length) Creates an instance of aBufferedPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuffer()Returns the value of thebufferrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longindex()Returns the value of theindexrecord component.longlength()Returns the value of thelengthrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BufferedPacket
Creates an instance of aBufferedPacketrecord class.- Parameters:
buffer- the value for thebufferrecord componentindex- the value for theindexrecord componentlength- the value for thelengthrecord 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 thecomparemethod from their corresponding wrapper classes. -
buffer
Returns the value of thebufferrecord component.- Returns:
- the value of the
bufferrecord component
-
index
public long index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
length
public long length()Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-