Interface RegisteredServer
public interface RegisteredServer
Represents a registered backend server that players can connect to.
-
Method Summary
Modifier and TypeMethodDescriptionGet the address of this server.getName()Get the name of this server.intGet the number of players connected to this server.Get all players currently connected to this server.booleanCheck if this is the default server.ping()Ping the server to check if it's online.booleansendPluginMessage(ChannelIdentifier channel, byte[] data) Sends a plugin message to this server.
-
Method Details
-
getName
-
getAddress
-
isDefault
boolean isDefault()Check if this is the default server. New players will be connected to the default server.- Returns:
- true if this is the default server
-
getPlayers
Get all players currently connected to this server.- Returns:
- an unmodifiable collection of connected players
-
getPlayerCount
int getPlayerCount()Get the number of players connected to this server.- Returns:
- the player count
-
ping
Ping the server to check if it's online.- Returns:
- a future that completes with the ping result
-
sendPluginMessage
Sends a plugin message to this server.Plugin messages allow the proxy to communicate with backend servers through registered channels. The server must have a corresponding plugin that listens for messages on this channel.
- Parameters:
channel- the channel to send ondata- the message data- Returns:
- true if the message was sent (at least one player connected), false otherwise
-