public static class ChannelInjector.ChannelSocketInjector extends Object implements SocketInjector
| Constructor and Description |
|---|
ChannelSocketInjector(ChannelInjector injector) |
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect(String message)
Attempt to disconnect the current client.
|
SocketAddress |
getAddress()
Retrieve the associated address of this player.
|
ChannelInjector |
getChannelInjector() |
org.bukkit.entity.Player |
getPlayer()
Retrieve the hooked player.
|
Socket |
getSocket()
Retrieve the associated socket of this player.
|
org.bukkit.entity.Player |
getUpdatedPlayer()
Retrieve the hooked player object OR the more up-to-date player instance.
|
void |
sendServerPacket(Object packet,
NetworkMarker marker,
boolean filtered)
Send a packet to the client.
|
void |
setUpdatedPlayer(org.bukkit.entity.Player updatedPlayer)
Set the real Bukkit player that we will use.
|
void |
transferState(SocketInjector delegate)
Invoked when a delegated socket injector transfers the state of one injector to the next.
|
public ChannelSocketInjector(ChannelInjector injector)
public Socket getSocket() throws IllegalAccessException
SocketInjectorgetSocket in interface SocketInjectorIllegalAccessException - If we're unable to read the socket field.public SocketAddress getAddress() throws IllegalAccessException
SocketInjectorgetAddress in interface SocketInjectorIllegalAccessException - If we're unable to read the socket field.public void disconnect(String message) throws InvocationTargetException
SocketInjectordisconnect in interface SocketInjectormessage - - the message to display.InvocationTargetException - If disconnection failed.public void sendServerPacket(Object packet, NetworkMarker marker, boolean filtered) throws InvocationTargetException
SocketInjectorsendServerPacket in interface SocketInjectorpacket - - server packet to send.marker - - the network marker.filtered - - whether or not the packet will be filtered by our listeners.InvocationTargetException - If an error occured when sending the packet.public org.bukkit.entity.Player getPlayer()
SocketInjectorgetPlayer in interface SocketInjectorpublic org.bukkit.entity.Player getUpdatedPlayer()
SocketInjectorgetUpdatedPlayer in interface SocketInjectorpublic void transferState(SocketInjector delegate)
SocketInjectortransferState in interface SocketInjectordelegate - - the new injector.public void setUpdatedPlayer(org.bukkit.entity.Player updatedPlayer)
SocketInjectorsetUpdatedPlayer in interface SocketInjectorupdatedPlayer - - the real Bukkit player.public ChannelInjector getChannelInjector()
Copyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.