Jump to content

Periodic data save (or how to get a timer server side)


kdx7214

Recommended Posts

I'm have a command mod that saves it's data in NBT format.  It's stored in memory for performance reasons, but I would like to write it to disk say every 15 minutes.  The math is no problem, the problem is I can't seem to find a way to get a timer event notification server-side.  The Timer class is client-side only.

 

Is there a tick event or some other less obvious way to achieve this?  Or is there a way to tap into the /save-on command so I can write the data back out?  I'd hate to have to write the data every time a user makes a change.

 

Thanks!

 

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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