[INACTIVE][MISC] SaveStopper v0.10 - Stops saving of the world [1337]

Discussion in 'Inactive/Unsupported Plugins' started by Bobby_Bonsai, Feb 10, 2011.

  1. Offline


    SaveStopper - Stops saving if no one is online:
    Version: v0.10 build 1337

    This plugin will stop the server from saving the world (via save-off/save-on) if no user is online.

    At the moment this only listens for the quit and login events of players. It will perform a simple check if the user was the last and, if yes, will issue a save-all and disable saving. On the next login of a user, it will re-enable it.

    Since my private server is without any casing (and will most likely stay that way) I could hear that my harddisks were in constant motion. After further investigation I found out that the minecraft server seems to write data to the disk every second even if no one is connected (most likely day/night cycle related, since everything else is pretty much dependent if a player is around or not). This is not a big issue, but I'm resting more peacefully knowing that my harddisks can rest also.

    From the technical side this has most likely no implication on the lifetime or performance of the harddisk. I wrote it purely to stop my harddisks from making noise if they don't have to. I hope somebody else will find it useful, too.

    Please be aware that I'm not actively maintaining this plugin. I might do some coding from time to time, but do not expect that I keep up with every Bukkit-Release. Also if you want to report errors or suggest new features, please do that on GitHub and do not expect this thread to be updated.


    Default configuration

    Download (Latest Version)
  2. Offline


    And what are the benefits of not saving when there is nobody online?
  3. Offline


    Better make a plugin that saves every X minutes
  4. Offline


    That my disk is not constantly making noise if it does not need to.
  5. Offline


    Does it save when the last player logs out?
  6. Offline


    @Tempelchat: Not at the moment. I was afraid of possible racing conditions if I send two commands directly after another...have to test that out, though.
  7. Offline


    Ooo This is a neat idea i like it, Could you perhaps make it so theres a timeout period lets say if like, a player disconnects the server waits 20 minutes does a save all and then disables saving?
  8. Offline


    I'll have to look at it. I haven't really worked with Java by now, but that idea is good.
  9. Offline


    I'd love to see a plugin that:

    Has a configurable message that broadcasts 2 minutes before a save.
    Has a configurable message to broadcast that the world is saving.
    Has a configurable message that announces when the save is done.

    We would love you mucho if you made this happen.
  10. Offline


  11. Offline


    This is perfect for people who're running servers at home just for their friends (like me) and don't have an SSD. Takes alot of the strain of the HDD and helps it live a little longer. Much thanks! [​IMG]
  12. Offline


    If you are saying this to run on #370, you are a bit futuristic. The latest build is #325 as of time of writing this post.
  13. Offline


    @Fugenshot: You're welcome.

    @Juze: Oh damn...wrong number...sorry, I'll fix that.
    --- merged: Feb 14, 2011 9:47 PM ---
    @Tempelchat: I've included the save-all. As it turns out, those calls are blocking, so no need to worry about racing conditions.
    --- merged: Feb 15, 2011 9:12 PM ---
    @HotelErotica: I've implemented a delayed disabling.
  14. Offline


    Version 0.4 is out. It now works with the new build (439, MC 1.3)!
  15. Offline


    2011-02-26 02:27:48 [SEVERE] null (Is it up to date?)
            at org.bonsaimind.bukkitplugins.SaveStopper.readConfiguration(SaveStopper.java:83)
            at org.bonsaimind.bukkitplugins.SaveStopper.onEnable(SaveStopper.java:71)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:140)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:426)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:79)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:60)
            at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:198)
            at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:189)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:77)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:176)
            at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:362)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:347)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Got that error when reloading and starting again
  16. Offline


    @Playingcs: Wow...now that's something I missed (I must have been stoned or something). Basically this problem only exists if no configuration file exists, I'm checking if the configuration could be loaded, and if not, I'm trying to read from it. oO'

    I'll fix it right away.

    @Playingcs: Done, this error shouldn't occur with v0.5. Thanks for reporting.

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


    Thanks! Works now.

    Just wondering if you can implant CraftBukkitUpToDate to SaveStopper?

    Thanks a bunch.
  18. Offline


    @Playingcs: Done, I've sent download-links towards CBUTD.
  19. Offline


    love the idea, and definitly a feature i think i'll keep on my server
    something that could be fixed: whenever any player disconnects, this message pops up:

    isn't actually stopped, though, unless there aren't any players left
    should probably move the checking portion to before that timer is started.
  20. Offline


    @jascotty2: Thanks for reporting. Yes, I missed that one. v0.6 is available.
  21. Offline


    But I like saving the world... prevents it from exploding, yknow.
  22. Offline


    20:09:44 [SEVERE] Nag author: 'Robert 'Bobby' Zenz' of 'SaveStopper' about the following: onPlayerQuit has been replaced with a new signature, (PlayerQuitEvent)
  23. Offline


    21:04:16 [SEVERE] Nag author: 'Robert 'Bobby' Zenz' of 'SaveStopper' about the following: onPlayerQuit has been replaced with a new signature, (PlayerQuitEvent)
  24. Offline


    @Zazamari, @Playingcs: Thanks for reporting, v0.7 is out.
  25. Offline


    19:48:43 [SEVERE] g loading SaveStopper v0.7 (Is it up to date?)
    java.lang.NoSuchFieldError: g
            at org.bonsaimind.bukkitplugins.SaveStopperCommandHelper.queueConsoleCommand(SaveStopperCommandHelper.java:49)
            at org.bonsaimind.bukkitplugins.SaveStopper.internalDisable(SaveStopper.java:153)
            at org.bonsaimind.bukkitplugins.SaveStopper.onEnable(SaveStopper.java:74)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    On build 731
  26. Offline


  27. Offline


    @Zazamari: Thanks for reporting, v0.8 is out which fixes compatibility.

    @jascotty2: Your SSConsoleCommander looks very interesting. Nice work!
  28. Offline


    Running 0.8 on Build 740 gives me this error whenever I (the first player) join the server.

    2011-04-30 21:31:54 [SEVERE] Could not pass event PLAYER_LOGIN to SaveStopper
            at org.bonsaimind.bukkitplugins.SaveStopper.enable(SaveStopper.java:110)
            at org.bonsaimind.bukkitplugins.SaveStopperPlayerListener.onPlayerLogin(SaveStopperPlayerListener.java:44)
            at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:260)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
            at net.minecraft.server.ServerConfigurationManager.a(ServerConfigurationManager.java:152)
            at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:82)
            at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:87)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)

    I'm not particularly fussed though, because another plugin (Backup) enables saving when I join, after taking a backup of the world.
  29. Offline


    @Poke: Woah, f$%&. I missed one instance of an old setting which is now getting called. Give me a half hour to get my dev environment back up and running (just reinstalled/upgraded my system).

    @Poke: v0.9 is out which should fix this issue.
  30. Offline


    I like this Plugin! And your SimpleCronClone too! Simple tools for privates Servers. :)
    But, apart from
    I see other Problems, eg Backup scripts that do save-off, save-on.
    I guess in this case Saving would remain enabled as well?
    And If someone logs into the Server while the Backup is running it enables saving prematurly?
    The problem is that the plugin has no Idea if saving was stopped by itself or by some other means.

    So, My Idea is: Add these commands:
    /savestopper check
    /savestopper auto
    /savestopper save-on
    /savestopper save-off
    'check' checks wether it has to disable saving. Could also be scheduled for periodic checks.
    'save-on', 'save-off', and 'auto' replace the save-on and save-off commands.
    (save-on = save-on & disables savestopper; save-off = save-off & disables savestopper; auto = enables savestopper)

    So, a Backup script would look like this

    /savestopper save-off
    /savestopper auto
    Instead of

Share This Page