/Player-Name-Tracker

A minecraft datapack for detecting player name changes and updating scoreboards accordingly, using macros.

Primary LanguagemcfunctionMIT LicenseMIT

Player-Name-Tracker

A minecraft datapack for detecting player name changes and updating scoreboards accordingly, using macros. (Only works in 1.20.2 or newer)

All Contributors Discord Tutorial Downloads

Social Image

How it Works 💡

This repo provides a datapack for detecting player name changes, allowing you to update important scoreboards accordingly. For example, if you store the player's level on a scoreboard they will lose their level when they change their name. This pack is a very lightweight implementation and contains 1 scoreboard, 1 text_display entity (which should be in spawn chunks), and only performs 2 ticking score checks. If a new player joins the server it will add them to a storage database and anytime a user reconnects it performs a query to see if their name has changed.

How to Use 📝

  1. Add the datapack to your world or namespace
  2. Open the mcfunction named "scorelist" under functions/new_name
  3. Add lines to specify how scoreboards should be handled. $(old_name) is the player's old name and @s is the player. I also recommend resetting the old name to prevent possible overlap.

Contributors 🧱


Cloud Wolf

🔨