Inactive [ADMN] AutoSave v2.0.1 - Automatic World Saves [935]

Discussion in 'Inactive/Unsupported Plugins' started by cereal, Feb 13, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    AutoSave is now on Bukkit Dev! Plenty of information and it is overall much better documented there than it has been here. Wiki pages really help organize all the information that is needed.

    Discuss AutoSave on Bukkit Dev and get information, files, and more from there!

    AutoSave - Automatic World Saves:
    Version: 2.0.1

    AutoSave is meant to provide a simple method to automatically save your world at a defined interval! This plugin ONLY saves to the proper world directories within the Minecraft server. It is not a backup plugin, it is meant to increase persistence and reduce the affects of a server crash.

    • Performs a world saves (same as save-all on console)
    • Repeats the above at user defined interval!
    • Warning messages
    • Multi-World Support
    • Configurable messages
    • Option to disable broadcast message
    Download The Plugin
    Source Code

    Version 2.0.1
    • Small library changes
    Version 2.0.0
    • Color Messages support!
    • Support for Multiple Permissions Plugins (natively)
    • No more version nagging
    • ASync Tasks instead of Sync Tasks (possible performance increase)
    Version 1.3.0
    • Perform save after last player leaves (quits/kicked).
    Full Changelog

    Future Release To-do List:
    • Calculate and create variable for time elapsed during save
    • Make bacon
    • Get more feature suggestions

    You can configure the plugin via an XML file located at "plugins/AutoSave/".
    • message.broadcastpre: Message broadcast to all players prior to save
    • message.broadcastprost: Message broadcast to all players after save completed
    • message.insufficentpermissions: Customizable generic insufficient permissions message
    • message.saveplayers: Customizable players save message
    • message.saveworlds: Customizable worlds save message
    • message.warning: Customizable warning message
    • Customizable value of "off"
    • value.on: Customizable value of "on"
    • var.broadcast: True or False value specifying if broadcasts should be used
    • var.debug: True or False value specifying for additional console output
    • var.interval: Number of seconds between saves
    • var.permissions: Bypass permissions entirely
    • Toggles reporting thread
    • var.uuid: Anonymous identification
    • var.warntime: n time before the save happens when a warning is broadcast to players, multiple values can be passed by separating by commas
    • var.worlds: Comma seperated list of loaded worlds to be saved. * indicates ALL worlds will be saved.
    If you want to user colors, its simple. Just use one of the following in the appropriate location (config file):
    • Aqua: %AQUA%
    • Black: %BLACK%
    • Dark Aqua: %DARK_AQUA%
    • Dark Blue: %DARK_BLUE%
    • Dark Gray: %DARK_GRAY%
    • Dark Green: %DARK_GREEN%
    • Dark Purple: %DARK_PURPLE%
    • Dark Red: %DARK_RED%
    • Gold: %GOLD%
    • Gray: %GRAY%
    • Green: %GREEN%
    • Light Purple: %LIGHT_PURPLE%
    • Red: %RED%
    • White: %WHITE%
    • Yellow: %YELLOW%
    Copyright 2011 MilkBowl (

    This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this license, visit or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.


    Note: ALL of the below commands can start with autosave instead of save if another plugin is using the save command such as WorldEdit. This will always allow access to the in game configuration of the plugin.

    Saves the world outside of the interval.​
    Requires Permission:​
    /save help
    Displays help dialogue​
    /save toggle
    Toggles the automatic saves (turns off or on depending on current setting)​
    Requires Permission: autosave.toggle​
    /save status
    Prints status message about the current state of automatic saves​
    Requires Permission: autosave.status​
    /save interval {seconds}
    Sets or gets the interval setting in seconds​
    Requires Permission: autosave.interval​
    /save addworld [value]
    Adds world to the World Save List​
    Requires Permission:​
    /save remworld [value]
    Removes world from the World Save List​
    Requires Permission:​
    /save world
    Displays the World Save List​
    Requires Permission:​
    /save broadcast {on|off}
    Sets or gets the broadcast setting​
    Requires Permission: autosave.broadcast​
    /save debug {on|off}
    Sets or gets the debug setting​
    Requires Permission: autosave.debug​
    /save warn {seconds[,seconds]...}
    Sets or gets the warning time setting in seconds (warns users of an upcoming save n seconds before it happens)​
    Requires Permission: autosave.warn​
    /save version
    Prints AutoSave version​
    Requires Permission: autosave.version​


    AutoSave reports minimal anonymous data to provide general usage tracking. No personal or server information is ever transmitted. The following data is provided:
    • Plugin Name (this will always be AutoSave)
    • Plugin Version
    • Bukkit Version (the full Bukkit version string)
    • Operating System
      • Name
      • Version
      • Architecture
    • Java Version
    This data helps me understand the environments in which AutoSave is used within, however you are more than welcome to disable it, either via "" in the configuration file, or "save report [off|on]" from console.

    Known Issues:
    • During upgrade messages no longer are colored
      • Solution: Delete config file or add colors manually

    Permissions can be disabled by manually editing the config file and setting "permissions" to false. That will completely disable Permissions. Running AutoSave without Permissions with the value to true (default) will cause the plugin to unload itself.

    Here are the permission settings, either do 'autosave.*' or use the granular permissions below: Allows the ability to save at any time​
    autosave.toggle: Allows the ability to stop and start AutoSave​
    autosave.status: Allows the ability to see status of AutoSave​
    autosave.interval: Allows the ability to see and change interval setting​
    autosave.broadcast: Allows the ability to see and change broadcast setting​
    autosave.version: Allows the ability to see the version of AutoSave​
    autosave.debug: Allows the ability to change the debug setting​
    autosave.warn: Allows the ability to see and change the warning time setting​ Allows the ability to view the world save list​ Allows the ability to add to the world save list​ Allows the ability to remove from the world save list​
    bobacadodl, iKeirNez, Joe12o and 12 others like this.
  2. Offline


    I'm using the bukkit schedular to throw a Runnable object(ie the saving code) to be run in the context of the main thread with a zero-tick delay. This is one of the few bukkit API calls which are explicitly marked as threadsafe, and the recommended way, and only supported way, to communicate back to the main thread from another thread,

    Events are not threadsafe.
    This version is not threadsafe and will likely have significant issues as it calls functions which are explicitly marked as not-threadsafe.
  3. Offline


    I have a question. Plugin works Ok, but in command window its only show:

    [INFO] Saving players
    Does it save chunks ? Because when I use command "save-all" in command window it only says:

    [INFO] Saving chunks
  4. Offline


    The automatic save process only says "[INFO] Saving players" after it has saved all players and the selected worlds. Honestly it needs to only report when an error occurs and maybe daily stats for how many saves occured, because forcing a save every 5-10 minutes is really spammy.
  5. Offline


    Cereals plugin is NOT threadsafe, meaning, it can corrupt your world data. Seeing he he was last seen 10 days ago, I made this plugin >HERE< which IS thread safe and won't corrupt your data in any way. I recommend using mine so as not to corrupt your world data. >HERE<
  6. Offline


    Sorry everyone for the delay, I've been away from home and also busy so I was a bit slow getting back to this, but alas Version 1.1.2 is now released with more bacon! Ok, so maybe not bacon but it at least has a nice contribution by Xon who decided to contribute to the project and has made this who deal be scheduled.

    So with that said, see the first post above for the latest download!

    That was meant to be surrounded by a check to see if debugging was enabled...whelp it wasn't and its been fixed in the latest version along with the merge of your pull request! Thanks!

    Oops! Well I was busy in the past week or so with work and such so I just barely got a chance to catch up on this. It's fixed now and all that fun stuff.

    That was a bug, it wasn't supposed to show that unless you had run "save debug on". You shouldn't see that happen unless you REALLY want the plugin to be spammy which I didn't like so I made it toggle-able.

    save-all is actually a Minecraft command, if you want to use AutoSaves command you should simply use "save" which will prompt a save based upon your configuration of AutoSave.

    Check your version, AutoSave couldn't find the functions it needs from the server which means its out of date :(

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 8, 2016
  7. Offline


    Thanks so much for the update.
  8. Offline


    Having problems here. The error is like this:

    And my config file for AutoSave looks like this:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE properties SYSTEM "">
    <entry key="value.on">on</entry>
    <entry key="message.stopping">Stopping Auto Saves</entry>
    <entry key="var.interval">300</entry>
    <entry key="message.starting">Starting Auto Saves</entry>
    <entry key="message.broadcastlookup">Auto Save broadcast is {%BROADCAST%}</entry>
    <entry key="">off</entry>
    <entry key="var.debug">false</entry>
    <entry key="message.broadcast">World Auto-Saving</entry>
    <entry key="message.worldlookup">World Save List is {%WORLDS%}</entry>
    <entry key="var.broadcast">true</entry>
    <entry key="var.worlds">*</entry>
    <entry key="message.version">AutoSave v{%VERSION%}</entry>
    <entry key="message.saveworlds">{%NUMSAVED%} Worlds Saved</entry>
    <entry key="var.permissions">true</entry>
    <entry key="message.broadcastchangesuccess">Auto Save broadcast is now {%BROADCAST%}</entry>
    <entry key="message.intervallookup">Auto Save interval is {%INTERVAL%}</entry>
    <entry key="message.intervalnotanumber">You must enter a valid number, ex: /save interval 300</entry>
    <entry key="message.broadcastnotvalid">You must enter a valid setting ({%ON%}, {%OFF%})</entry>
    <entry key="message.worldchangesuccess">World Save List is now {%WORLDS%}</entry>
    <entry key="message.statussuccess">Auto Save is running and last saved at {%DATE%}.</entry>
    <entry key="message.statusoff">Auto Save is not running (disabled)</entry>
    <entry key="message.statusfail">Auto Save has stopped, check the server logs for more info</entry>
    <entry key="message.insufficentpermissions">You do not have access to that command.</entry>
    <entry key="message.saveplayers">Players Saved</entry>
    <entry key="message.intervalchangesuccess">Auto Save interval is now {%INTERVAL%}</entry>

    Any idea what to do? And, why is the config file so messy?

  9. Offline


    It's XML.

    @KrisEike Uhh.. you posted a SimpleSave error message dude. This is AutoSave.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 8, 2016
  10. Offline


    Oh, ops! Two admins working on one thing at once isn't good it seems xD
    Thanks, i'll try to delete Simplesave.
  11. Offline


    Version 1.1.3 released. This is mostly for me and those who are kind enough to help others on this thread. It performs a simple check to ensure the methods for saving players and worlds actually exist (aka, somewhat kinda makes sure that CraftBukkit is relatively up to date). If it doesn't have those methods it'll disable itself and log some nice errors.

    Hopefully this makes supporting the plugin easier for all of us!

    As usual, see the release notes above for the link and also for the specifics of the changelog.
  12. Offline


    Ah, my console is so much cleaner now, no one is bothered by a mandatory broadcast (this runs off a ramdisk so it saves in half a second), and I don't have to worry about my map getting corrupted. Good times.
  13. Offline


    19:37:25 [INFO] Saving players
    19:37:25 [SEVERE] Stream Closed
    19:37:25 [SEVERE]at Method)
    19:37:25 [SEVERE]at net.minecraft.server.RegionFile.a(SourceFile:342)
    19:37:25 [SEVERE]at net.minecraft.server.RegionFile.a(SourceFile:279)
    19:37:25 [SEVERE]at net.minecraft.server.ChunkBuffer.close(SourceFile:259)
    19:37:25 [SEVERE]at
    19:37:25 [SEVERE]at
    19:37:25 [SEVERE]at net.minecraft.server.ChunkRegionLoader.a(SourceFile:59)
    19:37:25 [SEVERE]at net.minecraft.server.ChunkProviderServer.b(
    19:37:25 [SEVERE]at net.minecraft.server.ChunkProviderServer.a(
    19:37:25 [SEVERE]at net.minecraft.server.World.a(
    19:37:25 [SEVERE]at net.minecraft.server.World.g(
    19:37:25 [SEVERE]at net.minecraft.server.MinecraftServer.h(
    19:37:25 [SEVERE]at
    19:37:25 [SEVERE]at
    i get this error from time to time
  14. Offline


    Update to the new version, I think that might be a thread-related issue (which the new version fixes.)

    It might not be though, but it should be a harmless error in any case.
  15. Offline


    Yes, that error is provided by a previous version. The obvious sign is that we see [INFO] Saving players (an erroneously logged debug message) and then the saving of a region. The new version fixes both so your console will be less horrifying and more full of awesome!

    Nothing changed for the end users of AutoSave in the last two version so it should be a seamless upgrade.
  16. Offline


    Right now, it saves every 5 minutes it sems, how can i change that to every 10 minutes?


    Also, i get this error when it saves:

    13:23:40 [INFO] Saving players
    13:23:40 [SEVERE] Bad file descriptor
    13:23:40 [SEVERE] at Method)
    13:23:40 [SEVERE] at net.minecraft.server.RegionFile.a(SourceFile:342)
    13:23:40 [SEVERE] at net.minecraft.server.RegionFile.a(SourceFile:279)
    13:23:40 [SEVERE] at net.minecraft.server.ChunkBuffer.close(SourceFile:259)
    13:23:40 [SEVERE] at
    13:23:40 [SEVERE] at
    13:23:40 [SEVERE] at net.minecraft.server.ChunkRegionLoader.a(SourceFile:59)
    13:23:40 [SEVERE] at net.minecraft.server.ChunkProviderServer.b(
    13:23:40 [SEVERE] at net.minecraft.server.ChunkProviderServer.a(
    13:23:40 [SEVERE] at net.minecraft.server.World.a(
    13:23:40 [SEVERE] at net.minecraft.server.World.g(
    13:23:40 [SEVERE] at net.minecraft.server.MinecraftServer.h(
    13:23:40 [SEVERE] at
    13:23:40 [SEVERE] at

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 8, 2016
  17. Offline


    You're using an old version, download the new version.

    You can change how long it takes between each save by configuring the autosave config file, the default number is 300. It's measured in seconds. Make sure the server is off when you're changing it because a reload will just revert it back.
  18. Offline


    Use "save interval 600" which is in seconds which also is 10 minutes ;)

    As far as the other error your getting, your most likely using an out of date version just like woodzy. Either update to the latest version now and see if the error goes away, or use "save version" to get the current version so we can see if we should expect it.

    You can also use commands for everything except the custom messages so you could use "save interval 600" and even the same for broadcast, debugging, etc.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 8, 2016
  19. Offline


    Well, that's not working. /save is part of WorldEdit, and therefore, the /save command won't work.
    I'll try to download the newest version to see if the error goes away anyway. Thanks

  20. Offline


    Hmmm, didn't know that /save was used in WorldEdit. I'll see if I can provide a way to easily rename that via a configuration but not certain if that's even possible anymore given the current command implementation.
  21. Offline


    Don't quote me on this, but I think the trick is to make the actual command something obscure, and then having a configurable alias for it.

    You might just want to change the default command altogether though since WorldEdit use is incredibly common.
  22. Offline


    I would suggest it to be /lagre maybe.

    Lagre is the norwegian word for Save, and i have not seen any plugin using that command. Just a suggestion though.

  23. Offline


    You apparently cannot do dynamic aliases at this point -- bummer. So for now the solution was to simply use the name of my plugin as the command ("autosave") with an alias for "save" to provide easier access to those who actually can use it.

    With that said, another release! Apparently I'm trying to make a record number of releases today, but its ok because its helpful. Version 1.1.4 is now up and you can download it from the first post as always!

    If you indeed made a fork you should be contributing the changes you've made back to the project as this is explicitly an Open Source plugin as stated on my source code. If you didn't fork it and rewrote the code then don't worry, otherewise I'd appreciate it if you contributed back for the benefit of everyone.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 8, 2016
  24. Offline


    Its completely new code from yours. I just called it a fork so people would understand it has the same functionality.

    I'll edit the previous post.
  25. Offline


    No problem, was just wondering if it was or not. You should consider open sourcing your plugin, my opinion is that few people (if anyone) is going to purchase a plugin and a bit ironic to have a closed source plugin when Bukkit itself is doing what your asking users not to do with your code hehe.

    But anyways, this thread isn't about licensing and all that ;)
  26. Offline


    Also, I was looking through your code and wondering why you made a new thread, and call the Scheduler in it.
    Wouldn't that still technically make it not thread safe, because Scheduler is not listed as thread safe.

    Correct me if I'm wrong though.
  27. Offline


    Scheduler is synchronizing the TreeMap that is used (which is not thread safe). You can see this in their code on line 157 of

    I'll probably make a commit to use something more reasonable for this...maybe a Queue which would be better suited for these kinds of jobs anyways (and are completely thread safe and thus don't require synchronizing). Synchronizing the TreeMap makes the Scheduler Thread Safe, if its not listed as Thread Safe then maybe the Bukkit team hasn't reviewed each and every function to verify it yet, however for the usage here it works.

    Also, you're more than welcome to comment on my Github repositories which would probably be the best place to discuss the code anyhow.
  28. Offline


    Ok, just wondering.
  29. Offline


    Added a list of supported recommended builds which I will provide support for. Other builds MAY work, but as with CraftBukkit are really for development purposes and the brave. AutoSave currently supports the 6 latest recommended builds (crazy huh?). If your looking into which build to use, I recommend the most current recommended build but really thats a discussion for another thread.

    If your using one of the Recommended Builds listed you shouldn't have a problem with AutoSave updates in the future and if so there will be an announcement to inform you that it is no longer supported in future updates.

  30. Offline


    Thanks for updating!
  31. Offline


    Just released Version 1.1.5! It now is closer to making me bacon...possibly. Joking aside, it implements the ability to provide warning broadcasts to players at a configurable n time prior to the save. As always see the first post for the details on usage and configuration (this feature is disabled by default).

    Also, broadcast messages are now displayed to the console. Now the console will see the same / similar message as your players do.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 8, 2016
Thread Status:
Not open for further replies.

Share This Page