notify on /stop

This commit is contained in:
mangorifo
2023-04-27 09:41:17 +08:00
parent 0384c40730
commit df967d4a22
8 changed files with 19 additions and 150 deletions
@@ -14,22 +14,6 @@ public class ServerUtils {
public static String address = Utils.getServerHostPublicIP();
public static boolean serverIsUp(String serverAddress, Integer serverPort) {
/*Socket socket;
try {
socket = new Socket(address, port);
socket.close();
return true;
} catch (Exception e) {
try {
System.out.println("Server is inactive on default address. Pinging on fallback address (" + address_fallback + ")...");
Socket socket2 = new Socket(address_fallback, port);
socket2.close();
return true;
} catch (Exception exception) {
System.out.println("Server is inactive on fallback address. No longer pinging...");
return false;
}
}*/
try {
Server server = Bukkit.getServer();
Socket s = new Socket();