Hello, I have a map on my server where players will play and one where admins build. I want to make it so that every night or when I run a command the build world is copied to the player world. How would I do that?
@TehVoyager Well you'd overwrite any changes the players have made to the normal world in the mean time. I'm not sure that's desirable behaviour.
Restart the server and re-name world folders on a shutdown hook? Seems like you'll run into a lot more issues than just switching the worlds.
@mythbusterma It's not like a normal survival server, that is what I want to happen. @1Rogue I don't understand what you mean, I want the plugin to remove the region files and re-add the ones from the original map but I want the players to be in the same location.
So then do that and just copy over player data. This sounds like an XY problem, what are you actually trying to accomplish by doing this? Loading arenas?
This CAN be done using a script. Bash, Perl, Batch, depending on OS would all be able to achieve the desired affect. However, exactly what you want to do here is a bit cloudy. You want players to stay as they are, and for only blocks to change on shutdown/restart? That can be done, and if you'd like, I can write you a Perl script to do it. I'd probably make the script in such a way that it also starts the server, to be sure it is actually stopped when the copy operation is done... However, if you want a plugin to do this, it's fairly out of my league how to even begin. You'd need to unload the world, which means you'd also have to have a handle on it upon startup, making your plugin the one to load it in the first place...