This status call was wrong, in produced a tuple instead.

Honestly, ping should be wrapped up into the same variable!
This commit is contained in:
Peter Urda
2014-09-16 13:07:34 -07:00
parent 43caf72a59
commit d0d7e01850

View File

@@ -13,7 +13,7 @@ from mcstatus import MinecraftServer
server = MinecraftServer("localhost", 25565)
# 'ping' is supported by all Minecraft servers that are version 1.7 or higher.
status = server.ping_server()
status, ping = server.ping_server()
print("The server has %d players" % (status.players.online))
# 'query' has to be enabled in a servers' server.properties file.