Class RemotePlayer
java.lang.Object
net.ME1312.SubServers.Client.Common.Network.API.RemotePlayer
Simplified RemotePlayer Data Class
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classRemotePlayer Static Implementation Class -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionRemotePlayer(ObjectMap<String> raw) Create an API representation of a Remote PlayerprotectedRemotePlayer(DataClient client, ObjectMap<String> raw) Create an API representation of a Remote Player -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbroadcastMessage(String... messages) Sends messages to all playersstatic voidbroadcastMessage(String[] messages, IntConsumer response) Sends messages to all playersstatic voidbroadcastMessage(String message, IntConsumer response) Sends a message to all playersstatic voidbroadcastRawMessage(String... messages) Sends JSON format messages to all playersstatic voidbroadcastRawMessage(String[] messages, IntConsumer response) Sends JSON format messages to all playersstatic voidbroadcastRawMessage(String message, IntConsumer response) Sends a JSON format message to all playersvoidDisconnects this player from the networkvoiddisconnect(String reason) Disconnects this player from the networkvoiddisconnect(String reason, IntConsumer response) Disconnects this player from the networkvoiddisconnect(IntConsumer response) Disconnects this player from the networkstatic voiddisconnect(UUID... players) Disconnects these players from the networkstatic voiddisconnect(UUID[] players, String reason) Disconnects these players from the networkstatic voiddisconnect(UUID[] players, String reason, IntConsumer response) Disconnects these players from the networkstatic voiddisconnect(UUID[] players, IntConsumer response) Disconnects these players from the networkbooleanGets the remote address of this connection.getName()Get the unique name of this player.voidGets the proxy this player is connected to.Gets the proxy this player is connected to.getRaw()Get the raw representation of the ServervoidGets the server this player is connected to.Gets the server this player is connected to.longGet the Timestamp for when the data was last refreshedGet the UUID of this player.voidrefresh()Download a new copy of the data from SubDatavoidsendMessage(String... messages) Sends messages to this playervoidsendMessage(String[] messages, IntConsumer response) Sends messages to this playervoidsendMessage(String message, IntConsumer response) Sends a message to this playerstatic voidsendMessage(UUID[] players, String... messages) Sends messages to these playersstatic voidsendMessage(UUID[] players, String[] messages, IntConsumer response) Sends messages to these playersstatic voidsendMessage(UUID[] players, String message, IntConsumer response) Sends a message to these playersvoidsendRawMessage(String... messages) Sends JSON format messages to this playervoidsendRawMessage(String[] message, IntConsumer response) Sends JSON format messages to this playervoidsendRawMessage(String message, IntConsumer response) Sends a JSON format message to this playerstatic voidsendRawMessage(UUID[] players, String... messages) Sends JSON format messages to these playersstatic voidsendRawMessage(UUID[] players, String[] messages, IntConsumer response) Sends JSON format messages to these playersstatic voidsendRawMessage(UUID[] players, String message, IntConsumer response) Sends a JSON format message to these playersvoidTransfers this player to another servervoidtransfer(String server, IntConsumer response) Transfers this player to another serverstatic voidTransfers these players to another serverstatic voidtransfer(UUID[] players, String server, IntConsumer response) Transfers these players to another server
-
Field Details
-
instance
-
-
Constructor Details
-
RemotePlayer
Create an API representation of a Remote Player- Parameters:
raw- Raw representation of the Remote Player
-
RemotePlayer
Create an API representation of a Remote Player- Parameters:
client- SubData connectionraw- Raw representation of the Remote Player
-
-
Method Details
-
equals
-
refresh
public void refresh()Download a new copy of the data from SubData -
getUniqueId
Get the UUID of this player.- Returns:
- the UUID
-
getName
Get the unique name of this player.- Returns:
- the player's username
-
getAddress
Gets the remote address of this connection.- Returns:
- the remote address
-
getProxyName
Gets the proxy this player is connected to.- Returns:
- the proxy this player is connected to
-
getProxy
Gets the proxy this player is connected to.- Parameters:
callback- the proxy this player is connected to
-
getServerName
Gets the server this player is connected to.- Returns:
- the server this player is connected to
-
getServer
Gets the server this player is connected to.- Parameters:
callback- the server this player is connected to
-
broadcastMessage
Sends messages to all players- Parameters:
messages- Messages to send
-
broadcastMessage
Sends a message to all players- Parameters:
message- Message to sendresponse- Success Status
-
broadcastMessage
Sends messages to all players- Parameters:
messages- Messages to sendresponse- Success Status
-
sendMessage
Sends messages to this player- Parameters:
messages- Messages to send
-
sendMessage
Sends a message to this player- Parameters:
message- Message to sendresponse- Success Status
-
sendMessage
Sends messages to this player- Parameters:
messages- Messages to sendresponse- Success Status
-
sendMessage
Sends messages to these players- Parameters:
players- Players to selectmessages- Messages to send
-
sendMessage
Sends a message to these players- Parameters:
players- Players to selectmessage- Message to sendresponse- Success Status
-
sendMessage
Sends messages to these players- Parameters:
players- Players to selectmessages- Messages to sendresponse- Success Status
-
broadcastRawMessage
Sends JSON format messages to all players- Parameters:
messages- Messages to send
-
broadcastRawMessage
Sends a JSON format message to all players- Parameters:
message- Message to sendresponse- Success Status
-
broadcastRawMessage
Sends JSON format messages to all players- Parameters:
messages- Messages to sendresponse- Success Status
-
sendRawMessage
Sends JSON format messages to this player- Parameters:
messages- Messages to send
-
sendRawMessage
Sends a JSON format message to this player- Parameters:
message- Message to sendresponse- Success Status
-
sendRawMessage
Sends JSON format messages to this player- Parameters:
message- Message to sendresponse- Success Status
-
sendRawMessage
Sends JSON format messages to these players- Parameters:
players- Players to selectmessages- Messages to send
-
sendRawMessage
Sends a JSON format message to these players- Parameters:
players- Players to selectmessage- Message to sendresponse- Success Status
-
sendRawMessage
Sends JSON format messages to these players- Parameters:
players- Players to selectmessages- Messages to sendresponse- Success Status
-
transfer
Transfers this player to another server- Parameters:
server- Target server
-
transfer
Transfers this player to another server- Parameters:
server- Target serverresponse- Success status
-
transfer
Transfers these players to another server- Parameters:
players- Players to selectserver- Target server
-
transfer
Transfers these players to another server- Parameters:
players- Players to selectserver- Target serverresponse- Success status
-
disconnect
public void disconnect()Disconnects this player from the network -
disconnect
Disconnects this player from the network- Parameters:
response- Success status
-
disconnect
Disconnects this player from the network- Parameters:
reason- Disconnect Reason
-
disconnect
Disconnects this player from the network- Parameters:
reason- Disconnect Reasonresponse- Success status
-
disconnect
Disconnects these players from the network- Parameters:
players- Players to select
-
disconnect
Disconnects these players from the network- Parameters:
players- Players to selectresponse- Success status
-
disconnect
Disconnects these players from the network- Parameters:
players- Players to selectreason- Disconnect Reason
-
disconnect
Disconnects these players from the network- Parameters:
players- Players to selectreason- Disconnect Reasonresponse- Success status
-
getTimestamp
public long getTimestamp()Get the Timestamp for when the data was last refreshed- Returns:
- Data Timestamp
-
getRaw
Get the raw representation of the Server- Returns:
- Raw Server
-