-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect API Query all active servers #27
Comments
This is something the API can offer. Please look into this, it provides useful events such as ServerAddEvent, and once you know the servers on the network you can send a request to find out how many players they have. This is not within the scope of the LilyPad project - so you'll need to develop this by yourself. |
ServerAddEvent is called when a server connects to the cloud (I would assume). This is not working for my at the moment (probably my own stupidity), but I need to get the current state of the network when the server boots up. How would I go about that? |
Are you sure you're using |
In onEnable: connect = Bukkit.getServicesManager().getRegistration(Connect.class).getProvider();
connect.registerEvents(this); Same class: @EventListener
public void serverAdd(ServerAddEvent event) {
System.out.println("Adding: " + event.getServer());
}
@EventListener
public void serverRemove(ServerRemoveEvent event) {
System.out.println("Removing: " + event.getServer());
} Starting up or stopping a second server does nothing (both servers are connected and accessible). |
Solved it by sending a periodic "I am alive" message. |
When managing a server network, it would be nice if there was a way to see which servers are online at the moment (possibly with playercount?).
The text was updated successfully, but these errors were encountered: