I am trying to find a better way for "resetting" a world instead of backing up the folder deleting the level i need to reset and moving the backup back to the worlds/ folder. Would Level::setAutoSave(false) work as an alternative ?
Level->setAutoSave(bool $bool); sets that in level is saving updates eg. block places, breaks, etc. If you want use this method for resetting map, first save level Level->save() and for reset it unload and load again. This method does not creates zip files, it's only cancel saving level. If you want save world using zip file, look to my SkyWars plugin.
Because it's more safer. When I used Level->setAutoSave, some peoples said that it does not work. So I decided to try resetting using zip.
I use Level ::SetAutoSave(false) since 2 years and I have never encountered any problems but I agree, it's less safer.