CommandAPI 12.1.0
An API for the command UI introduced in Minecraft 1.13
Loading...
Searching...
No Matches
dev.jorel.commandapi.network.HandshakePacketHandler< InputChannel > Interface Template Reference

An interface for handling CommandAPIPackets on the CommandAPIProtocol#HANDSHAKE channel. More...

Inheritance diagram for dev.jorel.commandapi.network.HandshakePacketHandler< InputChannel >:

Public Member Functions

default void handlePacket (InputChannel sender, CommandAPIPacket packet)
 Handles a CommandAPIPacket according to the implementation of CommandAPIPacketHandler.
void handleSetVersionPacket (InputChannel sender, SetVersionPacket packet)
 Handles a SetVersionPacket.
default void handleProtocolVersionTooOldPacket (InputChannel sender, ProtocolVersionTooOldPacket packet)
 Handles a ProtocolVersionTooOldPacket.

Detailed Description

An interface for handling CommandAPIPackets on the CommandAPIProtocol#HANDSHAKE channel.

Each method handles a different packet. These methods should be implemented on each platform to define what happens when each packet is received.

Parameters
<InputChannel>The type of objects that might send a packet to this plugin

Member Function Documentation

◆ handlePacket()

default void dev.jorel.commandapi.network.HandshakePacketHandler< InputChannel >.handlePacket ( InputChannel sender,
CommandAPIPacket packet )

Handles a CommandAPIPacket according to the implementation of CommandAPIPacketHandler.

This should be implemented for each CommandAPIProtocol to handle packets on that channel.

Parameters
senderThe source of the packet.
packetThe data for the packet.

Implements dev.jorel.commandapi.network.CommandAPIPacketHandler< InputChannel >.

◆ handleProtocolVersionTooOldPacket()

default void dev.jorel.commandapi.network.HandshakePacketHandler< InputChannel >.handleProtocolVersionTooOldPacket ( InputChannel sender,
ProtocolVersionTooOldPacket packet )

Handles a ProtocolVersionTooOldPacket.

Parameters
senderThe source of the packet.
packetThe data for the packet.

◆ handleSetVersionPacket()

void dev.jorel.commandapi.network.HandshakePacketHandler< InputChannel >.handleSetVersionPacket ( InputChannel sender,
SetVersionPacket packet )

Handles a SetVersionPacket.

Parameters
senderThe source of the packet.
packetThe data for the packet.