public abstract class AbstractPacketInjector extends Object implements PacketInjector
| Constructor and Description |
|---|
AbstractPacketInjector(PacketTypeSet reveivedFilters) |
| 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.
|
boolean |
isCancelled(Object packet)
Determine if a packet is cancelled or not.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinputBuffersChanged, packetRecievedpublic AbstractPacketInjector(PacketTypeSet reveivedFilters)
public boolean isCancelled(Object packet)
PacketInjectorisCancelled in interface PacketInjectorpacket - - the packet to check.public void setCancelled(Object packet, boolean cancelled)
PacketInjectorsetCancelled in interface PacketInjectorpacket - - the packet to set.cancelled - - TRUE to cancel the packet, FALSE otherwise.public boolean addPacketHandler(PacketType type, Set<ListenerOptions> options)
PacketInjectoraddPacketHandler in interface PacketInjectortype - - the type of the packets to start intercepting.options - - any listener options.public boolean removePacketHandler(PacketType type)
PacketInjectorremovePacketHandler in interface PacketInjectortype - - the type of the packets to stop intercepting.public boolean hasPacketHandler(PacketType type)
PacketInjectorhasPacketHandler in interface PacketInjectortype - - the packet type to lookup.public Set<PacketType> getPacketHandlers()
PacketInjectorgetPacketHandlers in interface PacketInjectorpublic void cleanupAll()
PacketInjectorcleanupAll in interface PacketInjectorCopyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.