Restoring map to save

Discussion in 'Plugin Development' started by dark navi, Apr 19, 2012.

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

    dark navi

    Hey guys, I am making an arena-type server, so I'd love it if I could restore the map to it's former glory after a match.

    Right now I am disabling level saving on start-up. I was wondering if there is a way to get the world to reload it's self from it's file without restarting the server.

    Thanks!
     
  2. Offline

    Sayshal

    A whole world might be really hard, but I'd look at Mobarena, they can reset an entire arena in a world after the match concludes. (A 100x100x100 map caused me 3 second lag on a very strong computer, so a whole world...)
     
  3. Offline

    dark navi

    What I don't understand is that restarting the server can do it almost instantly. Is there no way to load/unload a world from file? I don't want to replace an area via individual blocks like you suggest above, I want to completely reload the world.
     
  4. Offline

    Njol

    Bukkit.unloadWorld(world, false) will unload a world without saving it.
     
  5. Offline

    dark navi

    I obviously wasn't clear enough in my previous posts. I want to unload, and then reload the world.
     
  6. Offline

    Njol

    I think the world is loaed automatically when it's required, e.g. when a player is teleported to it.
     
  7. Offline

    Jobi

    Would it be ok to just replace every destroyed block? If it is ok, than i can send you a code!
     
  8. Offline

    Sorroko

    I dont think it would be possible, replacing every single block would create a vast amount of lag. Reloading a world is the best way but it means you cant have any players in the world that you unload (Havent tried) so you would need a lobby world to be able to unload the arena world; Or it may be possible to kick everyone reload and then let everyone join again. But I am fairly sure you cant unload the main world.
     
  9. Offline

    DotEfekts

    I use MultiVerse adventure when I'm running an adventure map server. Takes 10-20 seconds to restore.
     
Thread Status:
Not open for further replies.

Share This Page