Class RemotePlayer
java.lang.Object
net.ME1312.SubServers.Bungee.Host.RemotePlayer
- All Implemented Interfaces:
SubDataSerializable
,RemotePlayer
Remote Player Class
-
Constructor Summary
ConstructorDescriptionRemotePlayer
(String name, UUID id, Proxy proxy, ServerInfo server, InetSocketAddress ip) Search for a Remote Player using their IDRemotePlayer
(ProxiedPlayer player) Translate a Local Player to a Remote PlayerRemotePlayer
(ProxiedPlayer player, ServerInfo server) Translate a Local Player to a Remote Player -
Method Summary
Modifier and TypeMethodDescriptionstatic void
broadcastMessage
(String... messages) Sends messages to all playersstatic void
broadcastMessage
(String[] messages, IntConsumer response) Sends a message to all playersstatic void
broadcastMessage
(String message, IntConsumer response) Sends a message to all playersstatic void
broadcastMessage
(net.md_5.bungee.api.chat.BaseComponent... message) Sends a message to all playersstatic void
broadcastMessage
(net.md_5.bungee.api.chat.BaseComponent[]... messages) Sends a message to all playersstatic void
broadcastMessage
(net.md_5.bungee.api.chat.BaseComponent[][] messages, IntConsumer response) Sends a message to all playersstatic void
broadcastMessage
(net.md_5.bungee.api.chat.BaseComponent[] message, IntConsumer response) Sends a message to all playersstatic void
broadcastMessage
(net.md_5.bungee.api.chat.BaseComponent message, IntConsumer response) Sends a message to all playersstatic void
disconnect
(UUID... players) Disconnects these players from the networkstatic void
disconnect
(UUID[] players, String reason) Disconnects these players from the networkstatic void
disconnect
(UUID[] players, String reason, IntConsumer response) Disconnects these players from the networkstatic void
disconnect
(UUID[] players, IntConsumer response) Disconnects these players from the networkboolean
get()
Get Local PlayerGets the remote address of this connection.getName()
Get the unique name of this player.getProxy()
Gets the proxy this player is connected to.Gets the name of the proxy this player is connected to.Gets the server this player is connected to.Gets the name of the server this player is connected to.Get the UUID of this player.static void
sendMessage
(UUID[] players, String... messages) Sends messages to these playersstatic void
sendMessage
(UUID[] players, String[] messages, IntConsumer response) Sends a message to these playersstatic void
sendMessage
(UUID[] players, String message, IntConsumer response) Sends a message to these playersstatic void
sendMessage
(UUID[] players, net.md_5.bungee.api.chat.BaseComponent... message) Sends a message to these playersstatic void
sendMessage
(UUID[] players, net.md_5.bungee.api.chat.BaseComponent[]... messages) Sends a message to these playersstatic void
sendMessage
(UUID[] players, net.md_5.bungee.api.chat.BaseComponent[][] messages, IntConsumer response) Sends a message to these playersstatic void
sendMessage
(UUID[] players, net.md_5.bungee.api.chat.BaseComponent[] message, IntConsumer response) Sends a message to these playersstatic void
sendMessage
(UUID[] players, net.md_5.bungee.api.chat.BaseComponent message, IntConsumer response) Sends a message to these playersstatic void
Transfers these players to another serverstatic void
transfer
(UUID[] players, String server, IntConsumer response) Transfers these players to another serverstatic void
transfer
(UUID[] players, ServerInfo server) Transfers these players to another serverstatic void
transfer
(UUID[] players, ServerInfo server, IntConsumer response) Transfers these players to another serverMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.ME1312.SubServers.Bungee.Library.Compatibility.RemotePlayer
disconnect, disconnect, disconnect, disconnect, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, transfer, transfer, transfer, transfer
-
Constructor Details
-
RemotePlayer
Translate a Local Player to a Remote Player- Parameters:
player
- Local Player
-
RemotePlayer
Translate a Local Player to a Remote Player- Parameters:
player
- Local Playerserver
- Server the player is on
-
RemotePlayer
Search for a Remote Player using their ID- Parameters:
name
- Player Nameid
- Player UUIDproxy
- Proxy the player is onserver
- Server the player is onip
- Player IP Address
-
-
Method Details
-
get
Description copied from interface:RemotePlayer
Get Local Player- Specified by:
get
in interfaceRemotePlayer
- Returns:
- Local Player (or null when not local)
-
getUniqueId
Description copied from interface:RemotePlayer
Get the UUID of this player.- Specified by:
getUniqueId
in interfaceRemotePlayer
- Returns:
- the UUID
-
getName
Description copied from interface:RemotePlayer
Get the unique name of this player.- Specified by:
getName
in interfaceRemotePlayer
- Returns:
- the player's username
-
getAddress
Description copied from interface:RemotePlayer
Gets the remote address of this connection.- Specified by:
getAddress
in interfaceRemotePlayer
- Returns:
- the remote address
-
getProxy
Gets the proxy this player is connected to.- Returns:
- the proxy this player is connected to
-
getProxyName
Description copied from interface:RemotePlayer
Gets the name of the proxy this player is connected to.- Specified by:
getProxyName
in interfaceRemotePlayer
- Returns:
- the name of the proxy this player is connected to
-
getServer
Description copied from interface:RemotePlayer
Gets the server this player is connected to.- Specified by:
getServer
in interfaceRemotePlayer
- Returns:
- the server this player is connected to
-
getServerName
Description copied from interface:RemotePlayer
Gets the name of the server this player is connected to.- Specified by:
getServerName
in interfaceRemotePlayer
- Returns:
- the name of the server this player is connected to
-
equals
-
forSubData
- Specified by:
forSubData
in interfaceSubDataSerializable
-
broadcastMessage
Description copied from interface:RemotePlayer
Sends messages to all players- Parameters:
messages
- Messages to send
-
broadcastMessage
Description copied from interface:RemotePlayer
Sends a message to all players- Parameters:
message
- Message to sendresponse
- Success Status
-
broadcastMessage
Description copied from interface:RemotePlayer
Sends a message to all players- Parameters:
messages
- Message to sendresponse
- Success Status
-
sendMessage
Description copied from interface:RemotePlayer
Sends messages to these players- Parameters:
players
- Players to selectmessages
- Messages to send
-
sendMessage
Description copied from interface:RemotePlayer
Sends a message to these players- Parameters:
players
- Players to selectmessage
- Message to sendresponse
- Success Status
-
sendMessage
Description copied from interface:RemotePlayer
Sends a message to these players- Parameters:
players
- Players to selectmessages
- Message to sendresponse
- 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 sendresponse
- 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 sendresponse
- 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 sendresponse
- Success Status
-
sendMessage
Description copied from interface:RemotePlayer
Sends a message to these players- Parameters:
players
- Players to selectmessage
- 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 selectmessage
- Message to sendresponse
- 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 selectmessage
- Message to sendresponse
- 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 selectmessages
- 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 selectmessages
- Message to sendresponse
- Success Status
-
transfer
Description copied from interface:RemotePlayer
Transfers these players to another server- Parameters:
players
- Players to selectserver
- Target server
-
transfer
Description copied from interface:RemotePlayer
Transfers these players to another server- Parameters:
players
- Players to selectserver
- Target serverresponse
- Success status
-
transfer
Description copied from interface:RemotePlayer
Transfers these players to another server- Parameters:
players
- Players to selectserver
- Target server
-
transfer
Description copied from interface:RemotePlayer
Transfers these players to another server- Parameters:
players
- Players to selectserver
- Target serverresponse
- Success status
-
disconnect
Description copied from interface:RemotePlayer
Disconnects these players from the network- Parameters:
players
- Players to select
-
disconnect
Description copied from interface:RemotePlayer
Disconnects these players from the network- Parameters:
players
- Players to selectresponse
- Success status
-
disconnect
Description copied from interface:RemotePlayer
Disconnects these players from the network- Parameters:
players
- Players to selectreason
- Disconnect Reason
-
disconnect
Description copied from interface:RemotePlayer
Disconnects these players from the network- Parameters:
players
- Players to selectreason
- Disconnect Reasonresponse
- Success status
-