Fix error
This commit is contained in:
parent
479c106612
commit
ea3b03b769
|
@ -12,6 +12,6 @@ with open("status.json") as f:
|
|||
mc = mcstatus.MinecraftServer("mc.bhh.sh",25565)
|
||||
status["online"], stats = online(mc)
|
||||
status["players"] = stats.raw["players"]
|
||||
status["players"]["sample"] = [x["name"] for x in status["players"]["sample"]]
|
||||
if "sample" in status["players"]: status["players"]["sample"] = [x["name"] for x in status["players"]["sample"]]
|
||||
with open("status.json","w") as f:
|
||||
json.dump(status,f)
|
||||
|
|
Loading…
Reference in New Issue