Class AbstractPacketInjector
java.lang.Object
com.comphenix.protocol.injector.packet.AbstractPacketInjector
- All Implemented Interfaces:
PacketInjector
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPacketHandler(PacketType type, Set<ListenerOptions> options) Start intercepting packets with the given packet type.voidPerform any necessary cleanup before unloading ProtocolLib.Retrieve every intercepted packet type.booleanhasPacketHandler(PacketType type) Determine if packets with the given packet type is being intercepted.booleanStop intercepting packets with the given packet type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.comphenix.protocol.injector.packet.PacketInjector
hasMainThreadListener, packetReceived
-
Constructor Details
-
AbstractPacketInjector
-
-
Method Details
-
addPacketHandler
Description copied from interface:PacketInjectorStart intercepting packets with the given packet type.- Specified by:
addPacketHandlerin interfacePacketInjector- Parameters:
type- - the type of the packets to start intercepting.options- - any listener options.- Returns:
- TRUE if we didn't already intercept these packets, FALSE otherwise.
-
removePacketHandler
Description copied from interface:PacketInjectorStop intercepting packets with the given packet type.- Specified by:
removePacketHandlerin interfacePacketInjector- Parameters:
type- - the type of the packets to stop intercepting.- Returns:
- TRUE if we successfuly stopped intercepting a given packet ID, FALSE otherwise.
-
hasPacketHandler
Description copied from interface:PacketInjectorDetermine if packets with the given packet type is being intercepted.- Specified by:
hasPacketHandlerin interfacePacketInjector- Parameters:
type- - the packet type to lookup.- Returns:
- TRUE if we do, FALSE otherwise.
-
getPacketHandlers
Description copied from interface:PacketInjectorRetrieve every intercepted packet type.- Specified by:
getPacketHandlersin interfacePacketInjector- Returns:
- Every intercepted packet type.
-
cleanupAll
public void cleanupAll()Description copied from interface:PacketInjectorPerform any necessary cleanup before unloading ProtocolLib.- Specified by:
cleanupAllin interfacePacketInjector
-