public class SpigotPacketInjector extends Object
| Modifier and Type | Field and Description |
|---|---|
static ReportType |
REPORT_CANNOT_CLEANUP_SPIGOT |
| Constructor and Description |
|---|
SpigotPacketInjector(ErrorReporter reporter,
ListenerInvoker invoker,
org.bukkit.Server server)
Create a new spigot injector.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canUseSpigotListener()
Determine if there is a Spigot packet listener.
|
void |
cleanupAll()
Invoked when the server is cleaning up.
|
ListenerInvoker |
getInvoker()
Retrieve the underlying listener invoker.
|
PacketInjector |
getPacketInjector()
Retrieve the dummy packet injection handler.
|
PlayerInjectionHandler |
getPlayerHandler()
Retrieve the dummy player injection handler.
|
PacketInjector |
getProxyPacketInjector()
Retrieve the real proxy packet injector.
|
boolean |
hasRegistered()
Determine if the Spigot packet listener has been registered.
|
Object |
packetQueued(Object networkManager,
Object connection,
Object packet)
Called when a packet is queued to be sent.
|
Object |
packetReceived(Object networkManager,
Object connection,
Object packet)
Called when a packet has been received and is about to be handled by the
current Connection.
|
boolean |
register(org.bukkit.plugin.Plugin plugin)
Register the Spigot packet injector.
|
void |
saveBuffered(Object handle,
byte[] buffered)
Save the buffered serialized input packet.
|
void |
setProxyPacketInjector(PacketInjector proxyPacketInjector)
Set the real proxy packet injector.
|
public static final ReportType REPORT_CANNOT_CLEANUP_SPIGOT
public SpigotPacketInjector(ErrorReporter reporter, ListenerInvoker invoker, org.bukkit.Server server)
reporter - - error reporterinvoker - - listener invokerserver - - serverpublic ListenerInvoker getInvoker()
public void setProxyPacketInjector(PacketInjector proxyPacketInjector)
proxyPacketInjector - - the real injector.public PacketInjector getProxyPacketInjector()
public static boolean canUseSpigotListener()
public boolean register(org.bukkit.plugin.Plugin plugin)
plugin - - the parent plugin.public boolean hasRegistered()
public PlayerInjectionHandler getPlayerHandler()
public PacketInjector getPacketInjector()
public void saveBuffered(Object handle, byte[] buffered)
handle - - the associated packet.buffered - - the buffere data to save.public Object packetReceived(Object networkManager, Object connection, Object packet)
The returned packet will be the packet passed on for handling, or in the case of null being returned, not handled at all.
networkManager - - the NetworkManager receiving the packetconnection - - the connection which will handle the packetpacket - - the received packetpublic Object packetQueued(Object networkManager, Object connection, Object packet)
The returned packet will be the packet sent. In the case of null being returned, the packet will not be sent.
networkManager - - the NetworkManager which will send the packetconnection - - the connection which queued the packetpacket - - the queue packetpublic void cleanupAll()
Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.