RCON commands feature (#1391)

Co-authored-by: christopher blodgett <christopher.blodgett@gmail.com>
This commit is contained in:
chblodg
2022-03-02 09:29:12 -08:00
committed by GitHub
parent 15869fd774
commit 4587b32480
8 changed files with 197 additions and 3 deletions
+6 -2
View File
@@ -20,12 +20,16 @@ mc_server_listening() {
mc-monitor status --host localhost --port "$SERVER_PORT" --timeout 10s >& /dev/null
}
java_clients_connected() {
java_clients_connections() {
local connections
if java_running ; then
connections=$(mc-monitor status --host localhost --port "$SERVER_PORT" --show-player-count)
else
connections=0
fi
(( connections > 0 ))
echo $connections
}
java_clients_connected() {
(( $(java_clients_connections) > 0 ))
}