| Constructor and Description |
|---|
ClosedInjector(org.bukkit.entity.Player player)
Construct a new injector that is always closed.
|
| 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.
|
public ClosedInjector(org.bukkit.entity.Player player)
player - - the associated player.public boolean inject()
InjectorNote that only active channels can be injected.
public void close()
Injectorpublic void sendServerPacket(Object packet, NetworkMarker marker, boolean filtered)
InjectorsendServerPacket in interface Injectorpacket - - the packet to send.marker - - the network marker.filtered - - whether or not the packet is filtered.public void recieveClientPacket(Object packet)
InjectorrecieveClientPacket in interface Injectorpacket - - the (NMS) packet to send.public PacketType.Protocol getCurrentProtocol()
InjectorgetCurrentProtocol in interface Injectorpublic NetworkMarker getMarker(Object packet)
Injectorpublic void saveMarker(Object packet, NetworkMarker marker)
InjectorsaveMarker in interface Injectorpacket - - the NMS packet.marker - - the associated marker.public void setUpdatedPlayer(org.bukkit.entity.Player player)
InjectorThis will not replace the current instance, but it will allow PacketEvent to provide additional player information.
setUpdatedPlayer in interface Injectorplayer - - the more up-to-date player.public org.bukkit.entity.Player getPlayer()
Injectorpublic void setPlayer(org.bukkit.entity.Player player)
Injectorpublic boolean isInjected()
InjectorisInjected in interface Injectorpublic boolean isClosed()
Injectorpublic int getProtocolVersion()
InjectorgetProtocolVersion in interface InjectorCopyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.