Package dev.jorel.commandapi.network
Interface HandshakePacketHandler<InputChannel>
- Type Parameters:
InputChannel- The type of objects that might send a packet to this plugin
- All Superinterfaces:
CommandAPIPacketHandler<InputChannel>
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.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidhandlePacket(InputChannel sender, CommandAPIPacket packet) Handles aCommandAPIPacketaccording to the implementation ofCommandAPIPacketHandler.default voidhandleProtocolVersionTooOldPacket(InputChannel sender, ProtocolVersionTooOldPacket packet) Handles aProtocolVersionTooOldPacket.voidhandleSetVersionPacket(InputChannel sender, SetVersionPacket packet) Handles aSetVersionPacket.
-
Method Details
-
handlePacket
Description copied from interface:CommandAPIPacketHandlerHandles aCommandAPIPacketaccording to the implementation ofCommandAPIPacketHandler. This should be implemented for eachCommandAPIProtocolto handle packets on that channel.- Specified by:
handlePacketin interfaceCommandAPIPacketHandler<InputChannel>- Parameters:
sender- The source of the packet.packet- The data for the packet.
-
handleSetVersionPacket
Handles aSetVersionPacket.- Parameters:
sender- The source of the packet.packet- The data for the packet.
-
handleProtocolVersionTooOldPacket
default void handleProtocolVersionTooOldPacket(InputChannel sender, ProtocolVersionTooOldPacket packet) Handles aProtocolVersionTooOldPacket.- Parameters:
sender- The source of the packet.packet- The data for the packet.
-