Minecraft – Create a world that would reset

minecraft-commandsminecraft-java-editionminecraft-java-edition-server

I'm making my first server to play with some friends, and I was wondering:

I have a world called Tuto to train new players to move, fight, eat, hunt… and in the end, a portal for another world. My point would be that everytime a player loads the world Tuto for the firt time, he finds it the way I built it, and not the way the previous persons left it.

Another way to see this is: how can I prevent the server to save the changes made in my Tuto world once the players left it?

Best Answer

Well, Minecraft does save changes on the fly, not when player leaves the map. So you need to have some backup and when the world is unloaded, replace old map with your backuped one.

For Spigot/bukkit servers there are some plugin tools (used especially for "automatic mines" or minigames, AFAIK MineResetLite can be example, or WorldEdit with Schematic files, or Map Reset), but for vanilla server/singleplayer you need to use commandblocks and area replacing - for that you have to have two copies of area and replace one by another via commandblock, but that really depends on area size (and expects closed area of course), for bigger ones it can heavily overload or crash the server...

And I really don't know how you deal with multiple players starting at same time? Do they share the area?

If I would want to achieve your needs, I would aim for something like "daily resets", because that would be easier than reset after every player leaves the map (and more server friendly). That can be achieved by script replacing map files from backuped folder on server restart (that you still do daily, don't you?), however you need to be sure players leave the area or they might get stuck.

With spigot/bukkit you can try to find some plugin for it, there are probably some around.