public interface ChannelListener
| Modifier and Type | Method and Description |
|---|---|
ErrorReporter |
getReporter()
Retrieve the current error reporter.
|
boolean |
hasListener(Class<?> packetClass)
Determine if there is a packet listener for the given packet.
|
boolean |
hasMainThreadListener(Class<?> packetClass)
Determine if there is a server packet listener that must be executed on the main thread.
|
boolean |
includeBuffer(Class<?> packetClass)
Determine if we need the buffer data of a given client side packet.
|
boolean |
isDebug()
Determine if debug mode is enabled.
|
PacketEvent |
onPacketReceiving(Injector injector,
Object packet,
NetworkMarker marker)
Invoked when a packet is being received from a client.
|
PacketEvent |
onPacketSending(Injector injector,
Object packet,
NetworkMarker marker)
Invoked when a packet is being sent to the client.
|
PacketEvent onPacketSending(Injector injector, Object packet, NetworkMarker marker)
This is invoked on the main thread.
injector - - the channel injector.packet - - the packet.marker - - the network marker.PacketEvent onPacketReceiving(Injector injector, Object packet, NetworkMarker marker)
This is invoked on an asynchronous worker thread.
injector - - the channel injector.packet - - the packet.marker - - the associated network marker, if any.boolean hasListener(Class<?> packetClass)
packetClass - - the packet class to check.boolean hasMainThreadListener(Class<?> packetClass)
packetClass - - the packet class to check.boolean includeBuffer(Class<?> packetClass)
packetClass - - the packet class.ErrorReporter getReporter()
boolean isDebug()
Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.