Record Class RespawnPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.RespawnPacket
- All Implemented Interfaces:
Packet, SendablePacket, ServerPacket, ServerPacket.Play
public record RespawnPacket(PlayerSpawnInfo playerSpawnInfo, byte copyData)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Handshake, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final NetworkBuffer.Type<RespawnPacket> -
Constructor Summary
ConstructorsConstructorDescriptionRespawnPacket(PlayerSpawnInfo playerSpawnInfo, byte copyData) Creates an instance of aRespawnPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbytecopyData()Returns the value of thecopyDatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theplayerSpawnInforecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
COPY_NONE
public static final int COPY_NONE- See Also:
-
COPY_ATTRIBUTES
public static final int COPY_ATTRIBUTES- See Also:
-
COPY_METADATA
public static final int COPY_METADATA- See Also:
-
COPY_ALL
public static final int COPY_ALL- See Also:
-
SERIALIZER
-
-
Constructor Details
-
RespawnPacket
Creates an instance of aRespawnPacketrecord class.- Parameters:
playerSpawnInfo- the value for theplayerSpawnInforecord componentcopyData- the value for thecopyDatarecord 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. -
playerSpawnInfo
Returns the value of theplayerSpawnInforecord component.- Returns:
- the value of the
playerSpawnInforecord component
-
copyData
public byte copyData()Returns the value of thecopyDatarecord component.- Returns:
- the value of the
copyDatarecord component
-