If you have a BungeeCord network then you might want to consider this plugin, it sends a message to all the servers connected to the bungeecord to check if they're offline.
If a server is offline and comes online it will send all players with a specific permission a message and if it is online and goes offline it will send all players with a specific permission a message.
You can also do /serverlist to show all servers alphabetically, along with the message you set to show in the config
Mostly everything is editable in this plugin below is the config.yml with all the comments and stuff so you can know what is what
Code (Text):Command:
#The command you want to list you the servers and if they're online
Main: serverlist
#The permission to do the command
Permission: serverlist.listservers
#Other ways to do the command
Aliases:
- listservers
- slist
- lists
# The delay between each check to see if any server went offline
Delay: 100
# The message you want to send to a player when they do one of the commands listed above
# Replaces {SERVER} with the server's name as defined in bungeecord config.yml
# Replaces {ONLINE} with the online player count if you use multiple bungeecord proxies it will still count players on other proxies
# Replaces {TOTAL} with the total server players
# Replaces {BUKKITMOTD} with the motd from the server.properties on the bukkit side
# Replaces {BUNGEEMOTD} with the motd from the bungee config.yml
# Replaces {IP} with the server's ip adress and port number
Server:
Ignore access: false
Online: '&a{SERVER} is online. There are &c{ONLINE}&a/&c{TOTAL} &acurrently online'
Offline: '&c{SERVER} is offline'
Update:
Online:
# Uses the same variables as the variables above
# Each new line is sent as a new line in the chat
Messages:
- '&a{SERVER} has came back online'
Permission: 'serverlist.servercameonline'
# Uses the same variables as the variables above
# Each new line is sent as a new line in the chat
Offline:
Messages:
- '&c{SERVER} has went offline'
Permission: 'serverlist.serverwentoffline'
Feel free to tell me any suggestions for what I should add
Features to come: None right now, Please suggest features you think I should add
EDIT: Added the server change event and messages when the server goes offline or comes online
For anyone wanting to use the server status event in their code this is what it would look like
Code (Text):@EventHandler
public void serverChangeStatus(ServerStatusChangeEvent e) {
if (e.isOnline()) {
// Server went online
} else {
// Server went offline
}
}

ServerCrashControl 1.1
Lets you know when a server has gone offline or comes online, read description for details