public interface PacketInjector
Modifier and Type | Method and Description |
---|---|
boolean |
addPacketHandler(int packetID)
Start intercepting packets with the given packet ID.
|
void |
cleanupAll()
Perform any necessary cleanup before unloading ProtocolLib.
|
java.util.Set<java.lang.Integer> |
getPacketHandlers()
Retrieve every intercepted packet ID.
|
boolean |
hasPacketHandler(int packetID)
Determine if packets with the given packet ID is being intercepted.
|
PacketEvent |
packetRecieved(PacketContainer packet,
Player client)
Let the packet listeners process the given packet.
|
boolean |
removePacketHandler(int packetID)
Stop intercepting packets with the given packet ID.
|
void |
undoCancel(java.lang.Integer id,
java.lang.Object packet)
Undo a packet cancel.
|
void undoCancel(java.lang.Integer id, java.lang.Object packet)
id
- - the id of the packet.packet
- - packet to uncancel.boolean addPacketHandler(int packetID)
packetID
- - the ID of the packets to start intercepting.boolean removePacketHandler(int packetID)
packetID
- - the ID of the packets to stop intercepting.boolean hasPacketHandler(int packetID)
packetID
- - the packet ID to lookup.java.util.Set<java.lang.Integer> getPacketHandlers()
PacketEvent packetRecieved(PacketContainer packet, Player client)
packet
- - a packet to process.client
- - the client that sent the packet.void cleanupAll()