WorldReset
WorldReset v2.0
Presenting the world's first standalone map reset plugin! When you restart your server, if resetting is enabled in the plugin's config.yml, WorldReset automatically deletes your world folders and imports backups of them stored in '.../plugins/WorldReset/backups'. WR can reset multiple worlds or regenerate them with random seeds, perfect for minigames and mining worlds.
NOTE: In order for this plugin to work, you have to /stop then start the server. A simple /reload will not work, and will likely cause the server to crash.
Setup/Usage
A world reset couldn't be more simple! Just follow these steps:
- Copy the world folder you want to revert to when you reset the map
- Find the 'WorldReset' folder in your server's 'plugins' directory. If the folder doesn't exist, run the server once and it will be created.
- Paste the world folder you copied into the 'backups' folder in the WorldReset directory.
- Repeat steps 1-3 for your Nether and End folders if you want to reset them as well.
- List the names of any worlds you want to delete and regenerate with random seeds under the "random-seed.worlds" config node
- If you want to schedule a restart, either run the server and type /wr reset or open the config.yml (found in the WorldReset directory) and set the "reset-worlds-on-next-restart" node to true.
- Start up your server! Your world folder will be reset to the one in '.../plugins/WorldReset/backups'!
Benefits
- Resets player location and inventories to their state stored in the world backup (you can always delete player data in the backup for standard spawning)
- Much less lag than conventional reset methods - instead of rolling back an area block by block, WorldReset simply imports the entire world folder, meaning that resets take less than a second!
- Because WorldReset doesn't have to deal with individual chunks, there's no danger of chunk corruption as long as your backup world is clean
- Random seed world regeneration is perfect for mining worlds that require diamonds and other valuables to be relocated every time the map resets
Commands
Configuration nodes
Configuration nodes
- reset-worlds-on-next-restart: true/false - whether to reset worlds (or regenerate them with new seeds, if enabled) the next time the server starts up
- random-seed.enabled: true/false - whether to delete and regenerate the worlds listed below with random seeds
- random-seed.worlds: - a list of the names of worlds to be regenerated
- reset-server-when-empty: true/false - whether to reset the server after the below player count has been achieved and all players log off
- player-count-to-activate-reset: 10 - the number of players online at the same time that must be achieved in order to schedule a reset to occur when the last player logs off (this setting only matters if the above node is set to 'true')
- always-reset: true/false - whether to reset/regenerate worlds every time the server starts up
Permissions nodes
- worldreset.reload: permission to run '/wr reload' to reload the configuration
- worldreset.reset: permission to schedule or cancel a world reset, including '/wr reset now'
- worldreset.settings.view: permission to view the configuration settings ingame with '/wr settings'
- worldreset.settings.edit: permission to edit the configuration settings ingame with '/wr settings edit \<setting ID> \<setting value>'
@JordanPierre2000
Does this update work for 1.5.2 yet? I want to update my private server, but this plugin is somewhat handy for reset
This does work for me, as far as I think it should.
When the server is empty (must have "player-count-to-activate-reset: 1") it stops the server.
I then edit my run batch file like this:
The start is like a marker, when the server is closed, it goes back to start and starts it again. The plugin then restores the world to the backed up state.
Hope this helps some people
I took the liberty of updating this plugin. Here is the link:
doesnt reset anything on 1.4.7
this is confirmed broke shit on 1.4.7
sorry guise and i cannot find anything to replace it either. you could maybe make some kind of startup script and get the shutdown plugin, but you would have to write a semi-complex batch script.
but i run remote toolkit so thats not an option for me. oh well......
Is there another plugin like this. This is really helpful for running CTM maps on a server. Does this plugin work with 1.4.7?
@cuddyier
Multicraft allows you to create scheduled tasks, so make one that starts your server every 3 minutes.
Plugins still working great in 1.4.6 I do find i have to use the stop command to ensure the server doesn't hang on kicking all if there is a lot of players online, but that's cool.
Do you think it would be possible to add some kind of world list, that it chooses from when replacing, so i can have one world called world, that gets reset from a list of worlds. Maybe this is not your intention for the plugin, just that it would work really well with the 45 minutes mini game we run.
I know i can get this to work with Multiverse and Multiverse-Adventure but really like worldreset and the fact my server is fresh after a restart between games.
When I do /resetworld and restart my server, once my server is back online, worldreset then stops my server for some reason and kicks everyone saying 'Resetting worlds', how do I make it so it just resets when I restart if I have it true in the config as I use multicraft which doesn't automatically start the server again.
Love the idea behind this plugin. Great work :D
Adding to cotjones request. Could you add a feature so the resetting can be scheduled at specific times?
I would like to use this plugin to run an adventure map that resets every 2 hours at set times so people can join and get going at set intervals. I was thinking about resetting a map at 00:00, 02:00, 04:00, etc.
I don't think giving all players access to the /resetworld command would be very sensible in my situation. A group of players could be near the end of the adventure, a new player joins and decides he wants to play NOW and resets the map... That would certainly make a few people unhappy ;)
Is it possible to add a feature so that the reset only occurs after a specified amount of time has passed?
It seems like a simple thing to write. Just store a time signature upon reset and then add a config entry for a delay time and then periodically check to see if that delay time has been exceeded to enable reset on next server restart.
@EpicTrance
"Resets player location and inventories to their state stored in the world backup (you can always delete player data in the backup for standard spawning)"
can you add a feature which in specified worlds people inventories wont be reset?
Good news!
I ended up having more time than expected today, so it's my pleasure to release WorldReset v1.3! I'll write up a detailed documentation of the new features tomorrow, but for the time being, the new features can be viewed in the file changelog.
Apologies for the hiatus, school and plugin commissions have had me tied down but things have slowed a bit so I'll find some time in the next few days to release a WorldReset update (for now I've updated it for 1.4.5 compatibility, with no changes made to the code).
@EpicTrance I'm afraid not. Such a feature is impossible due to the file lock imposed on the world files at server runtime. I'm looking into finding a way around it by creating and operating on custom worlds, but for the time being a full reset is necessary.
@DJTomek The feature you mentioned will be added in the next release, in a matter of days.
@Quinnatator Several people have mentioned adding this feature, and I agree that it's a good option to have, so look for it in the next release!
can this happen without reloading the server
@Fire897 Basically it copies world files from the plugin to the bukkit main directory. So its resetting only the worlds you configured.
So, does this reset ALL worlds or just ones that are set up to do so? Pardon my bad observation skills.
@Quinnatator +1
@DJTomek +1
Hey, can you add an option to reset the world when all players leave it? That would be awesome. Thanks.