public interface ServerInfo
Modifier and Type | Method and Description |
---|---|
boolean |
canAccess(CommandSender sender)
Whether the player can access this server.
|
InetSocketAddress |
getAddress()
Deprecated.
BungeeCord can connect via Unix domain sockets
|
String |
getMotd()
Returns the MOTD which should be used when this server is a forced host.
|
String |
getName()
Get the name of this server.
|
String |
getPermission()
Get the permission required to access this server.
|
Collection<ProxiedPlayer> |
getPlayers()
Get the set of all players on this server.
|
SocketAddress |
getSocketAddress()
Gets the connectable address for this server.
|
boolean |
isRestricted()
Whether this server is restricted and therefore only players with the
given permission can access it.
|
void |
ping(Callback<ServerPing> callback)
Asynchronously gets the current player count on this server.
|
void |
sendData(String channel,
byte[] data)
Send data by any available means to this server.
|
boolean |
sendData(String channel,
byte[] data,
boolean queue)
Send data by any available means to this server.
|
String getName()
@Deprecated InetSocketAddress getAddress()
SocketAddress getSocketAddress()
Collection<ProxiedPlayer> getPlayers()
String getMotd()
boolean isRestricted()
String getPermission()
boolean canAccess(CommandSender sender)
sender
- the player to check access forvoid sendData(String channel, byte[] data)
channel
- the channel to send this data viadata
- the data to sendboolean sendData(String channel, byte[] data, boolean queue)
channel
- the channel to send this data viadata
- the data to sendqueue
- hold the message for later sending if it cannot be sent
immediately.true
if the message was sent immediately,
false
otherwise if queue is true, it has been queued, if it
is false it has been discarded.void ping(Callback<ServerPing> callback)
callback
- the callback to call when the count has been retrieved.Copyright © 2012–2020 SpigotMC. All rights reserved.