From c9c542dcbc50c109d5cd3817f099759e5653aace Mon Sep 17 00:00:00 2001 From: Charles Le Maux Date: Fri, 6 Sep 2024 17:54:04 +0200 Subject: [PATCH] [+] Fixed query problem --- server_mc_manager.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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):