Open KaKi87 opened 3 years ago
Hi, actually there is no method getOfflinePlayers
but you might GET /player
and then sort by online value :
{
"link": "string",
"name": "string",
"online": true,
"uuid": "string"
}
Thanks, but I wouldn't have asked for this if the GET /player
endpoint returned both online and offline players... :/
Hi, getting the offline players proved to be pretty hard the last time I tried. But it was quite a while ago when I last tried. I guess it has something to do with the fact that Minecraft doesn't know about the players until they join for the first time, and after they leave there is only really a player data file left.
Wouldn't it be possible to loop over those data files ?
Theoretically yes, I'm not sure if Sponge has a built-in way to do this. I'm currently rewriting this plugin from scratch to include support for other minecraft API (such as spigot/paper and forge) and I hope to have first draft version out sometime soon. I'll see if I can include an option to list offline players, and add that to the Sponge version as well.
Actually, please prioritize Spigot support 😉
From: Marco notifications@github.com Sent: Monday, February 22, 2021 2:27:42 PM To: Valandur/Web-API Web-API@noreply.github.com Cc: KaKi87 tiana.lemesle@live.fr; Author author@noreply.github.com Subject: Re: [Valandur/Web-API] Get offline players (#145)
Theoretically yes, I'm not sure if Sponge has a built-in way to do this. I'm currently rewriting this plugin from scratch to include support for other minecraft API (such as spigot/paper and forge) and I hope to have first draft version out sometime soon. I'll see if I can include an option to list offline players, and add that to the Sponge version as well.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Valandur/Web-API/issues/145#issuecomment-783373053, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCMJ6LNZBTL6AYF5FWYBRDTAJLU5ANCNFSM4XSIKOFQ.
Hello,
How can I list offline players ?
Thanks