Record Class SetVersionPacket

java.lang.Object
java.lang.Record
dev.jorel.commandapi.network.packets.SetVersionPacket
Record Components:
protocolVersion - The CommandAPIProtocol.PROTOCOL_VERSION to send in this packet.
All Implemented Interfaces:
CommandAPIPacket

public record SetVersionPacket(int protocolVersion) extends Record implements CommandAPIPacket
A packet that conveys what CommandAPIProtocol.PROTOCOL_VERSION a connected instance of the CommandAPI is using.

This packet may be sent in any direction. It should be sent whenever a Player connects to a Server from the CommandAPI instances on both sides (if they exist). If this packet is never received, the protocol version defaults to 0.