Package net.md_5.bungee.api.connection
Interface ProxiedPlayer
- All Superinterfaces:
CommandSender,Connection
- All Known Subinterfaces:
ConnectedPlayer
Represents a player who's connection is being connected to somewhere else,
whether it be a remote or embedded server.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.md_5.bungee.api.connection.Connection
Connection.Unsafe -
Method Summary
Modifier and TypeMethodDescriptionvoidMake this player chat (say something), to the server he is currently on.voidconnect(ServerInfo target) Connects / transfers this user to the specified connection, gracefully closing the current one.Gets this player's display name.Get the pending connection that belongs to this player.Get the server which this player will be sent to next time the log in.Gets the server this player is connected to.voidsendData(byte[] data) Send a plugin message to this player.voidsetDisplayName(String name) Sets this players display name to be used as their nametag name.voidsetReconnectServer(ServerInfo server) Set the server which this player will be sent to next time the log in.Methods inherited from interface net.md_5.bungee.api.CommandSender
addGroups, getGroups, getName, hasPermission, removeGroups, sendMessage, sendMessages, setPermissionMethods inherited from interface net.md_5.bungee.api.connection.Connection
disconnect, getAddress, unsafe
-
Method Details
-
getDisplayName
String getDisplayName()Gets this player's display name.- Returns:
- the players current display name
-
setDisplayName
Sets this players display name to be used as their nametag name.- Parameters:
name- the name to set
-
connect
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 sendchannel- the channel to send this data via
-
getPendingConnection
PendingConnection getPendingConnection()Get the pending connection that belongs to this player.- Returns:
- the pending connection that this player used
-
chat
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
Set the server which this player will be sent to next time the log in.- Parameters:
server- the server to set
-