-
-
Notifications
You must be signed in to change notification settings - Fork 39
[Minecraft] Duplication of names in Minecraft #1288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you share the log lines where the user joined and it was duplicated? |
Suggestion: All minecraft servers should have a 'usernamecache.json' that has the format:
From this discord message: It's noted that the time starts from when a user joins. If we build upon that logic, we can use this to get their UUID, which will not change:
This will also use their minecraft username which is also unique. Either of these should be set as the source of truth, and build the analytics, online users list off of these. Additionally, as suggested in the thread, adding a space between the rank and username just results in |
Guessing it's this line here:
Note: This is after adding the space, but still having the |
Right click the instance and View Logs and get the log file from there and share it here. |
So yeah, looks like it changes the joining message. It's strange that it's duplicating it though, as the console user list has: But also a secondary user: |
Ugh... that mod is messy. Okay, I can work around this. Thanks! |
No problem! Yeah, I know I had some issues when I was doing analytics prior to amp implementing it. My logic was basically gather the logic from the username cache and when they joined. (Because while mc collects the stats in one of the files, it's tick-based and if the server isn't running a full 20tps then the time can be wildly inaccurate.) I basically just used the timestamp of the When a player left or the server no longer responded [via health check] (Since that was an edge case I didn't catch originally) I'd just log that as a session.
If you use the 'lost connection' log to indicate a leaving action, it always uses their unique-minecraft name to match it all back up, the |
Just as a heads up to anyone who hits the same issue and wants to fix it for an existing server's analytics - Open the instance's root dir ex: I ran:
as all my 'extra' users had Since it's in the AMP profile with read-only perms, you can do something like note: You'll want to stop your instance before doing this to avoid data loss. |
Operating System
Debian 12
AMP Version and Build Date
2.6.0.10 - 30/01/2025
AMP Release Stream
Mainline
I confirm that
Intended Action
Minecraft users are not duplicated.
Expected Behaviour
Minecraft usernames in analytics/online users are unique and should only include their actual minecraft username.
Actual Behaviour
Minecraft user's are duplicated in Analytics and online when using any type of nickname/name modifier such as ranks.
We can see that the user
christrot
here is being counted as his 'normal' username, as well as every rank they've ever been.Reproduction
Spin up minecraft and use any type of nickname/name modifier such as FTBRanks, etc.
The text was updated successfully, but these errors were encountered: