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

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

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

Public Member Functions

default void handlePacket (InputChannel sender, CommandAPIPacket packet)
 Handles a CommandAPIPacket according to the implementation of CommandAPIPacketHandler.
void handleUpdateRequirementsPacket (InputChannel sender, UpdateRequirementsPacket packet)
 Handles a UpdateRequirementsPacket.

Detailed Description

An interface for handling CommandAPIPackets on the CommandAPIProtocol#PLAY 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.PlayPacketHandler< 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 >.

◆ handleUpdateRequirementsPacket()

void dev.jorel.commandapi.network.PlayPacketHandler< InputChannel >.handleUpdateRequirementsPacket ( InputChannel sender,
UpdateRequirementsPacket packet )

Handles a UpdateRequirementsPacket.

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