1

I have a Bedrock Edition Minecraft server that is hosted on aternos.org. I haven't yet made it public, but I'm wondering if there's any way to track which players join my server. I know that Aternos keeps a log in the console (which includes which players join the game) but it is deleted after the next server startup.

Is there any way to either preserve all of these logs as they are created, or use commands in some way to track joining players? (A couple ideas I've had are summoning mobs with the same names as players in a pen or summoning items above a hopper but I don't know how to implement.)

3
  • Do you want to know which players joined your server, or how many time and when they did?
    – BunnyMerz
    Nov 2, 2021 at 22:25
  • Which players (which would tell me how many just by counting the list). I don't care about when. (Ideally it would be something I could clear manually every time I see it. I'm so glad someone finally asked about this post.
    – AdamRaichu
    Nov 2, 2021 at 22:47
  • After messing with some ideas, most of them didn't work. One of the possible solutions uses this datapack (github.com/MinecraftPhi/MinecraftPhi-modules/wiki) to store strings (player names) for later usage, but this would take much longer to get an answer. I'll take a look into it this week. If anyone has a better solution, please do.
    – BunnyMerz
    Nov 3, 2021 at 1:20

1 Answer 1

2
+50

You could try looking at the player files; if a player file is there, it is obvious that they have joined the server at some point as the game creates a new file for every new player that joins.

You can then compare that against a copy of the player data folder to get the delta; any new players that has joined since you last "cleared" (made a backup) it.


It's not a straight-forward as you've probably noticed after some experimenting, even though it's the same way as Java, just with a few more steps.

First, look up your server's WorldDB

You'll need a copy of your server's world folder. Copy it while the server is off. If you copy while the server is running, it is likely it still has a lock on the database and your resulting copy is "corrupt".

First, grab a Bedrock world viewer. The only one out there that works (that is noob-friendly) is Universal Minecraft Editor.

When you open your world, you'll be greeted by a bunch of random GUIDs.

Yup, these are some very random GUIDs.

If you want to edit save data, the one you only need to care about is those starting in server_<GUID>. Each entry maps exactly to one player.

But of course a player can access the server by any number of devices.

Next, convert that gobbolly goop into usable usernames.

If you look in the ones that don't end in server_<GUID>, you might notice three keys; MsaId (Microsoft Account ID), SelfSignedId (Cryptographic combination of the MsaId and ClientId) and the save data (ServerId).

MsaId: 00835208-f9f8-3231-a60e-45307f1f17ae

Unfortunately this is the furthest you can go due to security policies set by Microsoft. Unless all your users are in your own domain (as opposed to random Xbox Live users), Graph API is useless.

In case, authenticate and call:

https://graph.microsoft.com/v1.0/users/<MsaId>

Your best bet is to look at the console for any messages beginning in Player Connected: <Username> xid: <xBox numerical ID> or Player Disconnected: <Username> xid: <xBox numerical ID>.

A bunch of connections/disconnections

Unlike Java Edition where everything is wide open - Microsoft Accounts are security first. A handy way to keep logs (because Bedrock doesn't have logs for some reason) is to just redirect stdout.

bedrock_server.exe > %DATE%%TIME%.log
3
  • Where would I find these player files? Please note this is Bedrock Edition.
    – AdamRaichu
    Nov 4, 2021 at 12:31
  • 1
    I believe, unlike in Java where it's an actual file, it is an entry in the world's LevelDB. I'll update with some more detailed information when I have the time.
    – aytimothy
    Nov 4, 2021 at 13:41
  • If you update before the bounty expires you can have it.
    – AdamRaichu
    Nov 7, 2021 at 12:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .