Record Class ProtocolVersionTooOldPacket

java.lang.Object
java.lang.Record
dev.jorel.commandapi.network.packets.ProtocolVersionTooOldPacket
Record Components:
protocolVersion - The CommandAPIProtocol.PROTOCOL_VERSION to send in this packet.
reason - The reason why this packet is being sent.
All Implemented Interfaces:
CommandAPIPacket

public record ProtocolVersionTooOldPacket(int protocolVersion, String reason) extends Record implements CommandAPIPacket
A packet that informs a connected instance of the CommandAPI their CommandAPIProtocol.PROTOCOL_VERSION is too old to receive a different packet this instance wanted to send.

This packet may be sent in any direction. It is automatically sent whenever a ProtocolVersionTooOldException is thrown while writing another packet. When received, a ProtocolVersionTooOldException should be thrown on the receiving side that mimics the original exception.