Interface ProxiedPlayer

All Superinterfaces:
CommandSender, Connection
All Known Subinterfaces:
ConnectedPlayer

public interface ProxiedPlayer extends Connection, CommandSender
Represents a player who's connection is being connected to somewhere else, whether it be a remote or embedded server.
  • Method Details

    • getDisplayName

      String getDisplayName()
      Gets this player's display name.
      Returns:
      the players current display name
    • setDisplayName

      void setDisplayName(String name)
      Sets this players display name to be used as their nametag name.
      Parameters:
      name - the name to set
    • connect

      void connect(ServerInfo target)
      Connects / transfers this user to the specified connection, gracefully closing the current one. Depending on the implementation, this method might return before the user has been connected.
      Parameters:
      target - the new server to connect to
    • getServer

      Server getServer()
      Gets the server this player is connected to.
      Returns:
      the server this player is connected to
    • sendData

      void sendData(byte[] data)
      Send a plugin message to this player.
      Parameters:
      data - the data to send
    • getPendingConnection

      PendingConnection getPendingConnection()
      Get the pending connection that belongs to this player.
      Returns:
      the pending connection that this player used
    • chat

      void chat(String message)
      Make this player chat (say something), to the server he is currently on.
      Parameters:
      message - the message to say
    • getReconnectServer

      ServerInfo getReconnectServer()
      Get the server which this player will be sent to next time the log in.
      Returns:
      the server, or null if default
    • setReconnectServer

      void setReconnectServer(ServerInfo server)
      Set the server which this player will be sent to next time the log in.
      Parameters:
      server - the server to set