Class ChannelInjector.ChannelSocketInjector

java.lang.Object
com.comphenix.protocol.injector.netty.ChannelInjector.ChannelSocketInjector
All Implemented Interfaces:
SocketInjector
Enclosing class:
ChannelInjector

public static class ChannelInjector.ChannelSocketInjector extends Object implements SocketInjector
Represents a socket injector that foreards to the current channel injector.
Author:
Kristian
  • Method Details

    • getSocket

      public Socket getSocket()
      Description copied from interface: SocketInjector
      Retrieve the associated socket of this player.
      Specified by:
      getSocket in interface SocketInjector
      Returns:
      The associated socket.
    • getAddress

      public SocketAddress getAddress()
      Description copied from interface: SocketInjector
      Retrieve the associated address of this player.
      Specified by:
      getAddress in interface SocketInjector
      Returns:
      The associated address.
    • disconnect

      public void disconnect(String message)
      Description copied from interface: SocketInjector
      Attempt to disconnect the current client.
      Specified by:
      disconnect in interface SocketInjector
      Parameters:
      message - - the message to display.
    • sendServerPacket

      public void sendServerPacket(Object packet, NetworkMarker marker, boolean filtered)
      Description copied from interface: SocketInjector
      Send a packet to the client.
      Specified by:
      sendServerPacket in interface SocketInjector
      Parameters:
      packet - - server packet to send.
      marker - - the network marker.
      filtered - - whether or not the packet will be filtered by our listeners.
    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Description copied from interface: SocketInjector
      Retrieve the hooked player.
      Specified by:
      getPlayer in interface SocketInjector
      Returns:
      The hooked player.
    • getUpdatedPlayer

      public org.bukkit.entity.Player getUpdatedPlayer()
      Description copied from interface: SocketInjector
      Retrieve the hooked player object OR the more up-to-date player instance.
      Specified by:
      getUpdatedPlayer in interface SocketInjector
      Returns:
      The hooked player, or a more up-to-date instance.
    • transferState

      public void transferState(SocketInjector delegate)
      Description copied from interface: SocketInjector
      Invoked when a delegated socket injector transfers the state of one injector to the next.
      Specified by:
      transferState in interface SocketInjector
      Parameters:
      delegate - - the new injector.
    • setUpdatedPlayer

      public void setUpdatedPlayer(org.bukkit.entity.Player updatedPlayer)
      Description copied from interface: SocketInjector
      Set the real Bukkit player that we will use.
      Specified by:
      setUpdatedPlayer in interface SocketInjector
      Parameters:
      updatedPlayer - - the real Bukkit player.
    • isConnected

      public boolean isConnected()
      Description copied from interface: SocketInjector
      Determines if the player is currently connected.
      Specified by:
      isConnected in interface SocketInjector
      Returns:
      true if the player is connected.