mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Few updates to MC bedrock ping
This commit is contained in:
parent
3c48364998
commit
fbe9a7659d
@ -170,16 +170,17 @@ class Stats:
|
||||
except Exception as e:
|
||||
server_icon = False
|
||||
logger.info(f"Unable to read the server icon : {e}")
|
||||
|
||||
print('in raw stats')
|
||||
ping_data = {
|
||||
'online': ping_obj['server_player_count'],
|
||||
'max': ping_obj['server_player_max'],
|
||||
'players': online_stats.get('players', 0),
|
||||
'players': 0,
|
||||
'server_description': ping_obj['server_edition'],
|
||||
'server_version': ping_obj['server_version_name'],
|
||||
'server_icon': server_icon
|
||||
}
|
||||
|
||||
|
||||
return ping_data
|
||||
|
||||
def get_server_players(self, server_id):
|
||||
@ -359,7 +360,7 @@ class Stats:
|
||||
server_icon = False
|
||||
logger.info(f"Unable to read the server icon : {e}")
|
||||
|
||||
|
||||
print(ping_data)
|
||||
|
||||
server_stats = {
|
||||
'id': server_id,
|
||||
@ -372,11 +373,11 @@ class Stats:
|
||||
'world_size': self.get_world_size(world_path),
|
||||
'server_port': server_port,
|
||||
'int_ping_results': int_data,
|
||||
'online': ping_data['server_player_count'],
|
||||
'max': ping_data['server_player_max'],
|
||||
'online': ping_data['online'],
|
||||
'max': ping_data['max'],
|
||||
'players': 0,
|
||||
'server_description': ping_data['server_edition'],
|
||||
'server_version': ping_data['server_version_name'],
|
||||
'server_description': ping_data['server_description'],
|
||||
'server_version': ping_data['server_version'],
|
||||
'server_icon': server_icon
|
||||
}
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user