Need Help with Code Resetting Map to Backup!

Discussion in 'Plugin Development' started by RjSowden, May 23, 2012.

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

    RjSowden

    So I'm making a plugin that needs (when required) to kick everyone off the server and revert the map to a backup/master that is in the bukkit folder under a different name (//worldMASTER).

    It only needs the region files copying , so I've tried making it kick the players, unload the map - using getServer().unloadWorld("world", false) - but to no results. I've tried copying the files with the server running with windows too but of course it has the same result of SAYING its copied sucessfully, when in actual fact that map remains the same. The plugin runs save-off at the very start of the plugin loading

    When I shut it down completely it will copy properly and the map will reset, but of course I don't want the server to shut down because this whole thing is meant to be autonomous, and by shutting it down it will require a human to start it back up.

    My question: Is their a way to stop the server accessing the region files while I edit them, or if its easier another way to completely reset the map back to a state defined by a master copy?

    Thanks and I'm sorry if I didn't explain well enough...
     
  2. Offline

    makskay

    This might not directly address your issue, but it's possible to automatically stop and restart the server without requiring human intervention - there's several plugins out there that automatically restart the server when memory gets too low, or at scheduled intervals throughout the day. Looking at how these plugins do it might be your best bet.
     
  3. Offline

    LucasEmanuel

    Use the search function there are already several threads about this.
     
Thread Status:
Not open for further replies.

Share This Page