Данные могли устареть: источник временно недоступен, показан кэш.

ScoreFixer
Prevent scores from getting lost after player name changes.
- Загрузки
- 287
- Подписчики
- 1
- Обновлён
- 1 мая 2026 г.
- Лицензия
- MIT
Опубликован 24 июня 2025 г.
ScoreFixer
A robust Minecraft Data Pack library that prevents scoreboard values from getting lost after a player name change.
For inquiries, please contact @silicatYT on Discord.
Download: Modrinth
Issue tracker: GitHub
Why is this necessary?
In Minecraft, scores are tied to usernames rather than UUIDs. As such, changing your name resets your previously held scores (which can break Data Packs or lose progress), and anyone joining with your old name can take over your previous scores.
ScoreFixer tackles this issue and lets you automatically transfer scores to your new name without conflicts.
Features
- Automatically transfer certain scoreboard objectives' values to the new player name upon a name change
- Read/write offline players' scores using their UUID or specific scoreboard values (e.g. ID score) as selectors
- Events (function tags):
#score_fixer:changed_name,#score_fixer:joined_game&#score_fixer:left_game
How to use
Make scores transfer on name change
To make ScoreFixer automatically transfer objectives (e.g. "foo" & "bar") on name changes, run /function score_fixer:util/track_objectives {Objectives:["foo", "bar"]}.
To untrack objectives again, run /function score_fixer:util/untrack_objectives {Objectives:["foo", "bar"]}.
Alternatively, you can directly add or remove {Name:"foo"} to/from the score_fixer:objectives List data storage.
Access offline players' scores
Load
You can access offline players' scores with their UUID by running /function score_fixer:util/load_with_uuid {UUID:...} (accepts hexadecimal and int array format). If a player is found, their data is copied to score_fixer:loaded Players. From there, you can make changes (adjust score values, remove objectives from the list to reset them, etc).
Alternatively, you can manually copy data from every player that matches your custom condition like so:
/data modify storage score_fixer:loaded Players append from storage score_fixer:zprivate Maps[{Objectives:[{Name:"foo",Value:10}]}]
Save
After applying changes to the objectives in score_fixer:loaded Players, run /function score_fixer:util/save to save the data for all loaded players at once.
Events
#score_fixer:changed_name: When a player joins with a new name, this function tag is executed as that player. The data storagescore_fixer:event DatacontainsName,OldNameandUUID.#score_fixer:joined_game: When a player joins, this function tag is executed as that player. The data storagescore_fixer:event DatacontainsNameandUUID.#score_fixer:left_game: When a player leaves, this function tag is executed. The data storagescore_fixer:event DatacontainsNameandUUID.
The data inside score_fixer:event Data is also directly accessible using macros.
Upgrade or uninstall ScoreFixer
- Uninstall: Run
/function score_fixer:uninstall. - Upgrade:
- Uninstall the current version (keep the associated data), replace the Data Pack with the new version, then
/reload. - (v1.2.0+) Upgrading from v1.2.0 to a higher version can be done without uninstalling the current version first.
- Uninstall the current version (keep the associated data), replace the Data Pack with the new version, then
Good to know
Caveats to ScoreFixer
- Scores manually set while the player is offline (e.g.
/scoreboard players set SilicatYT foo 1) cannot be transferred if they join with a new name. Use theloadandsaveutilities instead.- Reason: While a player is offline, the game becomes case insensitive to that name, making it impossible to copy scores from the previous name to the new name if a player only changed their name capitalization.
Lantern Load
ScoreFixer supports Lantern Load, a convention that lets you specify dependencies (incl. versions) and control the order in which Data Packs run. It is vital that ScoreFixer loads and ticks before your Data Pack, so that scores can be assigned to the new player names before your Data Pack checks them.
- Make ScoreFixer load and tick before your Data Pack: Specify ScoreFixer as a Lantern Load dependency (makes it load first), and make your
loadfunction start a self-scheduledtickfunction instead of using#minecraft:tick. #ScoreFixer load.status: This score is set once ScoreFixer loads. Its value tells you whether ScoreFixer has loaded already. Negative values are error codes:- 1: ScoreFixer loaded correctly and can be used
- : ScoreFixer could not load (e.g. not installed)
- -1: Multiple incompatible ScoreFixer versions installed
- -2: Tried to load a ScoreFixer version while a newer one was previously installed and not manually uninstalled
- -3: Tried to load a ScoreFixer version while a different unknown version was previously installed and not manually uninstalled
#ScoreFixer.Version load.status: This score is set once ScoreFixer loads. Its value tells you what ScoreFixer version is installed. It's a single integer that increments whenever a potentially breaking change is made (e.g. behaviour change, utility function renamed etc). If the value does not change (e.g. only optimizations were made), any Data Packs that use ScoreFixer should not require any changes either.
Credit
From CMDred:
- SilicatYT
Additional help:
- Leinad677YT (Consulting & ideas)
License
As per the MIT License, you are allowed to redistribute, modify and use ScoreFixer as long as you provide credit for the original work.
Ченджлог
1.3.0Релиз26.1.1, 26.1.2, 26.2 · 1 мая 2026 г.
Note: Due to how the 1st bug had to be fixed, it's no longer feasible to support versions below 1.21.5.
Additions:
- Added utility functions
track_objectivesanduntrack_objectives(Described in the README)
Bugfixes:
- Fixed a rare bug where ScoreFixer would lose your scores if you changed your name, restarted the server (or singleplayer world) and rejoined before restarting your launcher
- Fixed a bug where running
true_uninstallwould fail when ScoreFixer was already uninstalled (Meaning it didn't work properly)
Changes:
#ScoreFixer.Version load.statusis now 3- Slightly optimized joining a world (Removed a player NBT access)
- Turned a loot table inline to reduce pollution
1.2.1Релиз26.1, 26.1.1, 26.1.2 · 8 декабря 2025 г.
Bugfixes
- Fixed a bug where a player's join might not register after they disconnect due to a server crash
1.2.1Релиз1.21.2, 1.21.3, 1.21.4 · 8 декабря 2025 г.
Bugfixes
- Fixed a bug where a player's join might not register after they disconnect due to a server crash
1.2.1Релиз1.20.5, 1.20.6 · 8 декабря 2025 г.
Bugfixes
- Fixed a bug where a player's join might not register after they disconnect due to a server crash
1.2.0Релиз1.21.8, 1.21.9, 1.21.10 · 5 октября 2025 г.
Additions:
- From now on, installing a new ScoreFixer version (higher than v1.2.0) will uninstall the previous version (only for 1.2.0+) without manually having to run
/function score_fixer:uninstall - Added a prompt to disable load messages on reload
Changes:
#ScoreFixer.Version load.statusis now 2- Slightly optimized and simplified join detection
- Removed a scoreboard objective (Now there's only 1 again)
- Removed
#ScoreFixer.VersionError load.statuserror codes, replacing them with#ScoreFixer load.status(Is now 1 if everything's fine, and negative values indicate ScoreFixer is disabled due to an error)- -1: Two incompatible
#ScoreFixer.Versions are installed - -2: Replaced a new ScoreFixer version with an older one without uninstalling the previous one (Cannot automatically downgrade)
- -3: Replaced an unknown ScoreFixer version without uninstalling the previous one (Cannot automatically up- or downgrade)
- -1: Two incompatible
Bugfixes:
- Fixed an issue where running
score_fixer:uninstallwould mark players as Offline without running their#score_fixer:left_gameevent, causing subsequent reloads (installing ScoreFixer) to run#score_fixer:joined_gamewithout running#score_fixer:left_gamebeforehand
1.2.0Релиз1.21.2, 1.21.3, 1.21.4 · 5 октября 2025 г.
Additions:
- From now on, installing a new ScoreFixer version (higher than v1.2.0) will uninstall the previous version (only for 1.2.0+) without manually having to run
/function score_fixer:uninstall - Added a prompt to disable load messages on reload
Changes:
#ScoreFixer.Version load.statusis now 2- Slightly optimized and simplified join detection
- Removed a scoreboard objective (Now there's only 1 again)
- Removed
#ScoreFixer.VersionError load.statuserror codes, replacing them with#ScoreFixer load.status(Is now 1 if everything's fine, and negative values indicate ScoreFixer is disabled due to an error)- -1: Two incompatible
#ScoreFixer.Versions are installed - -2: Replaced a new ScoreFixer version with an older one without uninstalling the previous one (Cannot automatically downgrade)
- -3: Replaced an unknown ScoreFixer version without uninstalling the previous one (Cannot automatically up- or downgrade)
- -1: Two incompatible
Bugfixes:
- Fixed an issue where running
score_fixer:uninstallwould mark players as Offline without running their#score_fixer:left_gameevent, causing subsequent reloads (installing ScoreFixer) to run#score_fixer:joined_gamewithout running#score_fixer:left_gamebeforehand
1.2.0Релиз1.20.5, 1.20.6 · 5 октября 2025 г.
Additions:
- From now on, installing a new ScoreFixer version (higher than v1.2.0) will uninstall the previous version (only for 1.2.0+) without manually having to run
/function score_fixer:uninstall - Added a prompt to disable load messages on reload
Changes:
#ScoreFixer.Version load.statusis now 2- Slightly optimized and simplified join detection
- Removed a scoreboard objective (Now there's only 1 again)
- Removed
#ScoreFixer.VersionError load.statuserror codes, replacing them with#ScoreFixer load.status(Is now 1 if everything's fine, and negative values indicate ScoreFixer is disabled due to an error)- -1: Two incompatible
#ScoreFixer.Versions are installed - -2: Replaced a new ScoreFixer version with an older one without uninstalling the previous one (Cannot automatically downgrade)
- -3: Replaced an unknown ScoreFixer version without uninstalling the previous one (Cannot automatically up- or downgrade)
- -1: Two incompatible
Bugfixes:
- Fixed an issue where running
score_fixer:uninstallwould mark players as Offline without running their#score_fixer:left_gameevent, causing subsequent reloads (installing ScoreFixer) to run#score_fixer:joined_gamewithout running#score_fixer:left_gamebeforehand
1.1.1Бета1.21.7, 1.21.8, 1.21.9 · 4 октября 2025 г.
Additions:
- Trying to run the functions in
score_fixer:util/orscore_fixer:settings/now also fails after runningscore_fixer:uninstall
Changes:
- Changed the way the join & leave detection works to support 1.21.9+
- In 1.21.9+ Singleplayer, the
#score_fixer:left_gameevent may now run in the same tick as (but before)#score_fixer:joined_game, when the player is already online again
- In 1.21.9+ Singleplayer, the
Bugfixes:
- Fixed an issue where all players were iterated over when someone left, instead of stopping once the correct number of players has been found
Комментарии
Загружаем…