2mal3 / Advancement-Count

Awards players a certain number of points for each advancement they complete. The total number for each player can then be viewed in the Tab list.
GNU Lesser General Public License v3.0
1 stars 0 forks source link

Name Change breaks score #28

Closed mulissi closed 1 month ago

mulissi commented 1 month ago

Minecraft version

1.20.6

Datapack version

v1.1.2 - 6.5.2024

Expected Behavior

Score would be preserved after name change

Actual Behavior

Score was reset to 0

Reproduction Steps

  1. have a score
  2. change username
  3. score resets to 0 despite already having advancements.

Additional information

One of my players decided to change their username. When they rejoined after doing so, their score had reset to 0. I reset the server eventually, but that did not get their score back.

Is the score connected to username rather than UUID?

It would be helpful to have a command that reloads and recalculates the score by querying what advancements are complete.

2mal3 commented 1 month ago

Yes, unfortunately this is a quirk of Minecraft that is also problematic for other datapacks. All scores are only saved based on the username. But what you suggested sounds like a good solution, let's see what I can do.

2mal3 commented 1 month ago

With the latest update, you can now use /function adco:recalculate to recalculate the scores of all players