Closed RudyB closed 8 years ago
You should be using server.status()
server.status gives me the amount of players, I want the names of the players as well.
Oh, sorry, I see what you're trying to do.
Is the server online?
Yes the server is, the server.status() correctly gives me the amount of players online
Ensure enable-query
is set to true in your server.properties
I'm positive it is
Server restart fixed the problem. Server had uptime of 4 months
Whenever I try to run a query based on a minecraft server IP, I keep getting the error: "socket.timeout: timed out"
Here is the code I am using:
server = MinecraftServer.lookup('mc.charliecraft.com')
query = server.query()
print("The server has the following players online: {0}".format(", ".join(query.players.names)))
Here is the exact error I am getting: