Package net.md_5.bungee.api.config
Interface ServerInfo
public interface ServerInfo
Class used to represent a server to connect to.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanAccess(CommandSender sender) Whether the player can access this server.Gets the connectable host + port pair for this server.getMotd()Returns the MOTD which should be used when this server is a forced host.getName()Get the name of this server.Get the set of all players on this server.voidsendData(byte[] data) Send data by any available means to this server.
-
Method Details
-
getName
String getName()Get the name of this server.- Returns:
- the configured name for this server address
-
getAddress
InetSocketAddress getAddress()Gets the connectable host + port pair for this server. Implementations expect this to be used as the unique identifier per each instance of this class.- Returns:
- the IP and port pair for this server
-
getPlayers
Collection<ProxiedPlayer> getPlayers()Get the set of all players on this server.- Returns:
- an unmodifiable collection of all players on this server
-
getMotd
String getMotd()Returns the MOTD which should be used when this server is a forced host.- Returns:
- the motd
-
canAccess
Whether the player can access this server. It will only return false when the player has no permission and this server is restricted.- Parameters:
sender- the player to check access for- Returns:
- whether access is granted to this server
-
sendData
void sendData(byte[] data) Send data by any available means to this server.- Parameters:
data- the data to sendchannel- the channel to send this data via
-