diff --git a/server_mc_manager.py b/server_mc_manager.py index 459b101..a3c6210 100644 --- a/server_mc_manager.py +++ b/server_mc_manager.py @@ -1,12 +1,12 @@ -import subprocess import shlex +import subprocess import time -import mcipc.query -import mcipc.query.client from typing import Union +import mcipc.query +import mcipc.query.client + import firebase_manager -import generic_executor class MinecraftServerManager: @@ -88,8 +88,7 @@ class MinecraftServerManager: if not self.servers[port]: return 0 with mcipc.query.Client('127.0.0.1', port) as client: - stats: mcipc.query.proto.FullStats = client.stats(full=True) - stats: int = stats.num_players + stats: int = client.stats(full=False).num_players return stats def set_cooldown(self, user_id):