Make set-greet-message require operator perms, remove System.out prints

This commit is contained in:
2026-01-17 12:18:22 +08:00
parent 6635b7aff4
commit 033e751c9a
12 changed files with 48 additions and 45 deletions
+3 -3
View File
@@ -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;
}