Make set-greet-message require operator perms, remove System.out prints
This commit is contained in:
@@ -19,7 +19,7 @@ public class ServerUtils {
|
||||
Socket s = new Socket();
|
||||
s.connect(new InetSocketAddress(serverAddress, Integer.parseInt(serverPort.toString())), 15);
|
||||
s.close();
|
||||
System.out.println("Server is online. Test notifying by sending a message to your webhook... (Pinged " + serverAddress + ":" + server.getPort() + ")");
|
||||
Bukkit.getConsoleSender().sendMessage("Server is online. Test notifying by sending a message to your webhook... (Pinged " + serverAddress + ":" + server.getPort() + ")");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
System.out.println("Server is inactive. Pinging fallback address...");
|
||||
@@ -28,10 +28,10 @@ public class ServerUtils {
|
||||
Socket s = new Socket();
|
||||
s.connect(new InetSocketAddress(address_fallback, Integer.parseInt(serverPort.toString())), 15);
|
||||
s.close();
|
||||
System.out.println("Server is online. Sending message to webhook_notify... (Pinged " + Utils.getServerHostPublicIP() + ":" + server.getPort() + ")");
|
||||
Bukkit.getConsoleSender().sendMessage("Server is online. Sending message to webhook_notify... (Pinged " + Utils.getServerHostPublicIP() + ":" + server.getPort() + ")");
|
||||
return true;
|
||||
} catch (Exception err) {
|
||||
System.out.println("Fallback address is inactive. No longer pinging...");
|
||||
Bukkit.getConsoleSender().sendMessage("Fallback address is inactive. No longer pinging...");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user