public interface PacketInjector
| Modifier and Type | Method and Description |
|---|---|
boolean |
addPacketHandler(PacketType type,
Set<ListenerOptions> options)
Start intercepting packets with the given packet type.
|
void |
cleanupAll()
Perform any necessary cleanup before unloading ProtocolLib.
|
Set<PacketType> |
getPacketHandlers()
Retrieve every intercepted packet type.
|
boolean |
hasPacketHandler(PacketType type)
Determine if packets with the given packet type is being intercepted.
|
void |
inputBuffersChanged(Set<PacketType> set)
Invoked when input buffers have changed.
|
boolean |
isCancelled(Object packet)
Determine if a packet is cancelled or not.
|
PacketEvent |
packetRecieved(PacketContainer packet,
org.bukkit.entity.Player client,
byte[] buffered)
Let the packet listeners process the given packet.
|
boolean |
removePacketHandler(PacketType type)
Stop intercepting packets with the given packet type.
|
void |
setCancelled(Object packet,
boolean cancelled)
Set whether or not a packet is cancelled.
|
boolean isCancelled(Object packet)
packet - - the packet to check.void setCancelled(Object packet, boolean cancelled)
packet - - the packet to set.cancelled - - TRUE to cancel the packet, FALSE otherwise.boolean addPacketHandler(PacketType type, Set<ListenerOptions> options)
type - - the type of the packets to start intercepting.options - - any listener options.boolean removePacketHandler(PacketType type)
type - - the type of the packets to stop intercepting.boolean hasPacketHandler(PacketType type)
type - - the packet type to lookup.void inputBuffersChanged(Set<PacketType> set)
set - - the new set of packets that require the read buffer.Set<PacketType> getPacketHandlers()
PacketEvent packetRecieved(PacketContainer packet, org.bukkit.entity.Player client, byte[] buffered)
packet - - a packet to process.client - - the client that sent the packet.buffered - - a buffer containing the data that had to be read in order to construct the packet.void cleanupAll()
Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.