Saving Player Data

Hi! I created my custom HomeData for “home plugin”.
When player joins (idk that all is ok):

player.offer(player.getOrCreate(HomeData::class.java).get())

How can i make that it saves on leave and loads on join?

So the data manipulator is saved on world save. Its not designed to be saved at any other point. If you want to save at another point then its better to save into a config

The problem is every time when player joins (doesn’t matter new or old) ,it has new HomeData.
Sorry if i didn’t write clear before

Then you have probably done something wrong with your data manipulator. Can you show the code?

1 Like

It likely isn’t made to be persistent. Ensure that you are overriding toContainer.

Did you mean DataManipulatorBuilder?

Edit: Ok i see i didnt implement that

1 Like