Is user data different from player data?

Hello, I am trying to modify the data of a User object. However, it does not seem to contain the same data that the Player object has. For example, I set custom data to a player when they join. When the server is restarted, I print out all of the data of a User with the same UUID of the Player, but my custom data is nowhere to be found. Is data stored to the Player not accessible by the User?

@gabizou Any insight?

Are you sure the data is persisted?
Data in the toContainer() method in your manipulator is saved to disk. Anything else is not.

User is a quasi partially implemented offline support system of a Player's full data. There’s a multitude of API’s that are partially implemented for Users that are fully implemented for Players, and it’s mostly stemming from having to interpret raw NBT information, something that Data implementation is not able to do until the schematics branch has added the subsystems to do so.

For now, Users are still partially implemented for basics, but not fully implemented for a great many things, including custom data manipulation.

1 Like

@pie_flavor Yes, the data has been used perfectly in the past.

@gabizou Ok, that makes sense. Is there any way that I can offer and remove custom data of a Player just by knowing the UUID?

Not that I know of, would need to flesh out the Data implementation on User specifically. There’s a fair bit of data implementation that is backed by NBT based that is added in the schematics branch waiting to be merged soon.

1 Like

Okay, thanks anyways.