Best way to reset a map?

Discussion in 'Plugin Development' started by Smartloser, Apr 20, 2014.

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

    Smartloser

    Hey guys. So, I was wondering what was the best way to reload a map? let's say I'm making a minigame where people fight in a map and they can break blocks etc. when it ends, whats the best way to reset the map so it'll come back to it's original state before the game started?

    Thank you

    Regards,
    Smartloser
     
  2. Offline

    TheMcScavenger

    Have the map saved somewhere, copy the map to a new world (just duplicate the folder) let them play on that, and delete it afterwards.
     
  3. Offline

    Badeye

    There are a couple plugins doing it, like Map Reset and World Reset. You could use one of them or you look into their source and try to mirror what they have done and implement it into your code. But basicly it works how TheMcScavenger said it, you can't replace the map during the game (at least i do not know any way of doing it), exept you loop through the blocks in your "reset Map" and set those blocks to the blocks in your current map. That can be done while the server is still running but hell... That would take time and recources, plus if something fails, your map is broken. Just have a seperate world folder and replace the world, that is easier.
     
Thread Status:
Not open for further replies.

Share This Page