Class AbstractPlayerInjectionHandler
java.lang.Object
com.comphenix.protocol.injector.player.AbstractPlayerInjectionHandler
- All Implemented Interfaces:
PlayerInjectionHandler
public abstract class AbstractPlayerInjectionHandler
extends Object
implements PlayerInjectionHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.comphenix.protocol.injector.player.PlayerInjectionHandler
PlayerInjectionHandler.ConflictStrategy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPacketHandler(PacketType type, Set<ListenerOptions> options) Add an underlying packet handler of the given type.booleanWhether or not this player injection handler can also receive packets.voidcheckListener(PacketListener listener) Determine if a listener is valid or not.voidcheckListener(Set<PacketListener> listeners) Determine if the given listeners are valid.voidclose()Close any lingering proxy injections.Retrieve the current list of registered sending listeners.voidRemove an underlying packet handler of this 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.player.PlayerInjectionHandler
getChannel, getProtocolVersion, handleDisconnect, hasMainThreadListener, injectPlayer, receiveClientPacket, sendServerPacket, uninjectPlayer, updatePlayer
-
Constructor Details
-
AbstractPlayerInjectionHandler
-
-
Method Details
-
addPacketHandler
Description copied from interface:PlayerInjectionHandlerAdd an underlying packet handler of the given type.- Specified by:
addPacketHandlerin interfacePlayerInjectionHandler- Parameters:
type- - packet type to register.options- - any specified listener options.
-
removePacketHandler
Description copied from interface:PlayerInjectionHandlerRemove an underlying packet handler of this type.- Specified by:
removePacketHandlerin interfacePlayerInjectionHandler- Parameters:
type- - packet type to unregister.
-
getSendingFilters
Description copied from interface:PlayerInjectionHandlerRetrieve the current list of registered sending listeners.- Specified by:
getSendingFiltersin interfacePlayerInjectionHandler- Returns:
- List of the sending listeners's packet IDs.
-
close
public void close()Description copied from interface:PlayerInjectionHandlerClose any lingering proxy injections.- Specified by:
closein interfacePlayerInjectionHandler
-
canReceivePackets
public boolean canReceivePackets()Description copied from interface:PlayerInjectionHandlerWhether or not this player injection handler can also receive packets.- Specified by:
canReceivePacketsin interfacePlayerInjectionHandler- Returns:
- TRUE if it can, FALSE otherwise.
-
checkListener
Description copied from interface:PlayerInjectionHandlerDetermine if a listener is valid or not.If not, a warning will be printed to the console.
- Specified by:
checkListenerin interfacePlayerInjectionHandler- Parameters:
listener- - listener to check.
-
checkListener
Description copied from interface:PlayerInjectionHandlerDetermine if the given listeners are valid.- Specified by:
checkListenerin interfacePlayerInjectionHandler- Parameters:
listeners- - listeners to check.
-