Hey, I want a method or any ideas on how I would check if a server has become offline from the proxy and therefore notify all online staff that server has disconnected from the network. Ideally I don't want to be checking 24/7 only when a server is disconnected should it broadcast
You can make a HashMap and put in it the Server name and his status. And a Scheduler which check the Server status and when the Server is Offline can you broadcast it.
Nice idea, but a scheduler for every server? Imagine a network with more than 1000 servers. I would use Java sockets. Evertime a server is shutting down, he sends information to the socket and then it broadcasts it on the network
I think that it don't work with proxy only. It would be a nice idea for the next BungeeCord update to implement that
Or we could all be smart and use ServerInfo#ping... simply check if the throwable in the callback is null, and if so, the server is online.