Dinnerbone / mcstatus

A Python class for checking the status of an enabled Minecraft server
http://dinnerbone.com/minecraft/tools/status/
1.11k stars 146 forks source link

Access UUIDs of players? #158

Closed Kamisoi closed 3 years ago

Kamisoi commented 3 years ago

Hey, sorry for kinda noobish question, but can't find way to obtain player names & uuids at once; is it even possible there?

kevinkjt2000 commented 3 years ago

Have you looked in the .raw part of status?

from mcstatus import MinecraftServer
status = MinecfraftServer("example.com").status()
print(status.raw["players"])

There should be uuid's present if the server is sharing them. They are part of the server list ping response https://wiki.vg/Server_List_Ping#Response which is what the raw status contains.

Kamisoi commented 3 years ago

I was looking into .raw part, but of query rather than status. Thanks for help!