public interface Injector
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the current injector.
|
PacketType.Protocol |
getCurrentProtocol()
Retrieve the current protocol state.
|
NetworkMarker |
getMarker(Object packet)
Retrieve the network marker associated with a given packet.
|
org.bukkit.entity.Player |
getPlayer()
Retrieve the current player or temporary player associated with the injector.
|
int |
getProtocolVersion()
Retrieve the current protocol version of the player.
|
boolean |
inject()
Inject the current channel.
|
boolean |
isClosed()
Determine if this channel has been closed and cleaned up.
|
boolean |
isInjected()
Determine if the channel has already been injected.
|
void |
recieveClientPacket(Object packet)
Recieve a packet on the server.
|
void |
saveMarker(Object packet,
NetworkMarker marker)
Associate a given network marker with a specific packet.
|
void |
sendServerPacket(Object packet,
NetworkMarker marker,
boolean filtered)
Send a packet to a player's client.
|
void |
setPlayer(org.bukkit.entity.Player player)
Set the current player instance.
|
void |
setUpdatedPlayer(org.bukkit.entity.Player player)
Set the updated player instance.
|
int getProtocolVersion()
boolean inject()
Note that only active channels can be injected.
void close()
void sendServerPacket(Object packet, NetworkMarker marker, boolean filtered)
packet - - the packet to send.marker - - the network marker.filtered - - whether or not the packet is filtered.void recieveClientPacket(Object packet)
packet - - the (NMS) packet to send.PacketType.Protocol getCurrentProtocol()
NetworkMarker getMarker(Object packet)
packet - - the packet.void saveMarker(Object packet, NetworkMarker marker)
packet - - the NMS packet.marker - - the associated marker.org.bukkit.entity.Player getPlayer()
void setPlayer(org.bukkit.entity.Player player)
player - - the current player.boolean isInjected()
boolean isClosed()
void setUpdatedPlayer(org.bukkit.entity.Player player)
This will not replace the current instance, but it will allow PacketEvent to provide additional player information.
player - - the more up-to-date player.Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.