Class RemotePlayer

java.lang.Object
net.ME1312.SubServers.Bungee.Host.RemotePlayer
All Implemented Interfaces:
SubDataSerializable, RemotePlayer

public class RemotePlayer extends Object implements RemotePlayer, SubDataSerializable
Remote Player Class
  • Constructor Details

    • RemotePlayer

      public RemotePlayer(ProxiedPlayer player)
      Translate a Local Player to a Remote Player
      Parameters:
      player - Local Player
    • RemotePlayer

      public RemotePlayer(ProxiedPlayer player, ServerInfo server)
      Translate a Local Player to a Remote Player
      Parameters:
      player - Local Player
      server - Server the player is on
    • RemotePlayer

      public RemotePlayer(String name, UUID id, Proxy proxy, ServerInfo server, InetSocketAddress ip)
      Search for a Remote Player using their ID
      Parameters:
      name - Player Name
      id - Player UUID
      proxy - Proxy the player is on
      server - Server the player is on
      ip - Player IP Address
  • Method Details

    • get

      public ProxiedPlayer get()
      Description copied from interface: RemotePlayer
      Get Local Player
      Specified by:
      get in interface RemotePlayer
      Returns:
      Local Player (or null when not local)
    • getUniqueId

      public UUID getUniqueId()
      Description copied from interface: RemotePlayer
      Get the UUID of this player.
      Specified by:
      getUniqueId in interface RemotePlayer
      Returns:
      the UUID
    • getName

      public String getName()
      Description copied from interface: RemotePlayer
      Get the unique name of this player.
      Specified by:
      getName in interface RemotePlayer
      Returns:
      the player's username
    • getAddress

      public InetSocketAddress getAddress()
      Description copied from interface: RemotePlayer
      Gets the remote address of this connection.
      Specified by:
      getAddress in interface RemotePlayer
      Returns:
      the remote address
    • getProxy

      public Proxy getProxy()
      Gets the proxy this player is connected to.
      Returns:
      the proxy this player is connected to
    • getProxyName

      public String getProxyName()
      Description copied from interface: RemotePlayer
      Gets the name of the proxy this player is connected to.
      Specified by:
      getProxyName in interface RemotePlayer
      Returns:
      the name of the proxy this player is connected to
    • getServer

      public Server getServer()
      Description copied from interface: RemotePlayer
      Gets the server this player is connected to.
      Specified by:
      getServer in interface RemotePlayer
      Returns:
      the server this player is connected to
    • getServerName

      public String getServerName()
      Description copied from interface: RemotePlayer
      Gets the name of the server this player is connected to.
      Specified by:
      getServerName in interface RemotePlayer
      Returns:
      the name of the server this player is connected to
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • forSubData

      public ObjectMap<String> forSubData()
      Specified by:
      forSubData in interface SubDataSerializable
    • broadcastMessage

      public static void broadcastMessage(String... messages)
      Description copied from interface: RemotePlayer
      Sends messages to all players
      Parameters:
      messages - Messages to send
    • broadcastMessage

      public static void broadcastMessage(String message, IntConsumer response)
      Description copied from interface: RemotePlayer
      Sends a message to all players
      Parameters:
      message - Message to send
      response - Success Status
    • broadcastMessage

      public static void broadcastMessage(String[] messages, IntConsumer response)
      Description copied from interface: RemotePlayer
      Sends a message to all players
      Parameters:
      messages - Message to send
      response - Success Status
    • sendMessage

      public static void sendMessage(UUID[] players, String... messages)
      Description copied from interface: RemotePlayer
      Sends messages to these players
      Parameters:
      players - Players to select
      messages - Messages to send
    • sendMessage

      public static void sendMessage(UUID[] players, String message, IntConsumer response)
      Description copied from interface: RemotePlayer
      Sends a message to these players
      Parameters:
      players - Players to select
      message - Message to send
      response - Success Status
    • sendMessage

      public static void sendMessage(UUID[] players, String[] messages, IntConsumer response)
      Description copied from interface: RemotePlayer
      Sends a message to these players
      Parameters:
      players - Players to select
      messages - Message to send
      response - Success Status
    • broadcastMessage

      public static void broadcastMessage(net.md_5.bungee.api.chat.BaseComponent... message)
      Description copied from interface: RemotePlayer
      Sends a message to all players
      Parameters:
      message - Message to send
    • broadcastMessage

      public static void broadcastMessage(net.md_5.bungee.api.chat.BaseComponent message, IntConsumer response)
      Description copied from interface: RemotePlayer
      Sends a message to all players
      Parameters:
      message - Message to send
      response - Success Status
    • broadcastMessage

      public static void broadcastMessage(net.md_5.bungee.api.chat.BaseComponent[] message, IntConsumer response)
      Description copied from interface: RemotePlayer
      Sends a message to all players
      Parameters:
      message - Message to send
      response - Success Status
    • broadcastMessage

      public static void broadcastMessage(net.md_5.bungee.api.chat.BaseComponent[]... messages)
      Description copied from interface: RemotePlayer
      Sends a message to all players
      Parameters:
      messages - Message to send
    • broadcastMessage

      public static void broadcastMessage(net.md_5.bungee.api.chat.BaseComponent[][] messages, IntConsumer response)
      Description copied from interface: RemotePlayer
      Sends a message to all players
      Parameters:
      messages - Message to send
      response - Success Status
    • sendMessage

      public static void sendMessage(UUID[] players, net.md_5.bungee.api.chat.BaseComponent... message)
      Description copied from interface: RemotePlayer
      Sends a message to these players
      Parameters:
      players - Players to select
      message - Message to send
    • sendMessage

      public static void sendMessage(UUID[] players, net.md_5.bungee.api.chat.BaseComponent message, IntConsumer response)
      Description copied from interface: RemotePlayer
      Sends a message to these players
      Parameters:
      players - Players to select
      message - Message to send
      response - Success Status
    • sendMessage

      public static void sendMessage(UUID[] players, net.md_5.bungee.api.chat.BaseComponent[] message, IntConsumer response)
      Description copied from interface: RemotePlayer
      Sends a message to these players
      Parameters:
      players - Players to select
      message - Message to send
      response - Success Status
    • sendMessage

      public static void sendMessage(UUID[] players, net.md_5.bungee.api.chat.BaseComponent[]... messages)
      Description copied from interface: RemotePlayer
      Sends a message to these players
      Parameters:
      players - Players to select
      messages - Message to send
    • sendMessage

      public static void sendMessage(UUID[] players, net.md_5.bungee.api.chat.BaseComponent[][] messages, IntConsumer response)
      Description copied from interface: RemotePlayer
      Sends a message to these players
      Parameters:
      players - Players to select
      messages - Message to send
      response - Success Status
    • transfer

      public static void transfer(UUID[] players, String server)
      Description copied from interface: RemotePlayer
      Transfers these players to another server
      Parameters:
      players - Players to select
      server - Target server
    • transfer

      public static void transfer(UUID[] players, String server, IntConsumer response)
      Description copied from interface: RemotePlayer
      Transfers these players to another server
      Parameters:
      players - Players to select
      server - Target server
      response - Success status
    • transfer

      public static void transfer(UUID[] players, ServerInfo server)
      Description copied from interface: RemotePlayer
      Transfers these players to another server
      Parameters:
      players - Players to select
      server - Target server
    • transfer

      public static void transfer(UUID[] players, ServerInfo server, IntConsumer response)
      Description copied from interface: RemotePlayer
      Transfers these players to another server
      Parameters:
      players - Players to select
      server - Target server
      response - Success status
    • disconnect

      public static void disconnect(UUID... players)
      Description copied from interface: RemotePlayer
      Disconnects these players from the network
      Parameters:
      players - Players to select
    • disconnect

      public static void disconnect(UUID[] players, IntConsumer response)
      Description copied from interface: RemotePlayer
      Disconnects these players from the network
      Parameters:
      players - Players to select
      response - Success status
    • disconnect

      public static void disconnect(UUID[] players, String reason)
      Description copied from interface: RemotePlayer
      Disconnects these players from the network
      Parameters:
      players - Players to select
      reason - Disconnect Reason
    • disconnect

      public static void disconnect(UUID[] players, String reason, IntConsumer response)
      Description copied from interface: RemotePlayer
      Disconnects these players from the network
      Parameters:
      players - Players to select
      reason - Disconnect Reason
      response - Success status