Jump to content

Data save after restart


Recommended Posts

Hello, im aware to an experience modder this is probably a simple question, but ive just started today so bear with me. Ive managed to create a tile entity that saves inventory data after accessing the inventory based on this tutorial by kaupenjoe

this video Works great, works a treat, until you restart the server and all the contents of the inventory are gone. 


Ive got a bunch of years experience in spigot and bukkit development and to make data persistent through restarts there we usually just save to a MySQL or YML file. I think I could probably list through all the entities with item capibility on the server when it shuts down and then save them to a YML file, and then load them back in on startup, but i have a feeling thats a very inefficient way of doing things. Anyone have any advice?

I tried looking at some other mods for an example, also tried reading the docs on this forum about capabilities and such, but couldnt quite wrap my head around it. If anyone could break it down for me real simple would be much appreciated!


Edited by Honchkrow
spelling error
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.