FastWorldReset icon

FastWorldReset -----

Reset your worlds fast without lag and without restarting server! Good for minigames and others.




Skript 2.6.4 support, fixes weird error (was already available on gitea for a long time, just not posted here till today)
----------, Apr 19, 2024

- Removed error on "cancel event" in on chunk unload that was here for a long time if you're using 1.13+, because it was older than 1.13 versions feature that is not used when your server is running 1.13+. Skript 2.6 allows me to not parse code under specific condition which has allowed me to remove this error.

- Made reset type to default to world-based on 1.13+ servers during reset creation, as it was automatically falling back to world-based reset when resetting with chunk-based reset anyway, as chunk-based reset only works below 1.13

- Adjusted messages to explain the difference in reset types between Minecraft versions better.

- Fixed a <none> in /fwr help

Please leave a review if this script has helped you.
----------, Dec 15, 2021

This update was on my git repo for some time, I decided to make official release.

- Small fixes with messages, small optimizations

- 2.6 Skript support, if you use older version of Skript, you may have to adjust some lines of code, but I recommend to update to Skript 2.6, because it fixes a memory leak that most previous Skript versions had.

- Added 1 tick delay between every world reset or load that happens on server startup, it looks like it fixes a very rare world corruption issue that I found after years of using FastWorldReset. (I did not test very much, but it seemed to get better with this delay)
----------, Dec 14, 2021

This update consists of various suggestions and bug-finds by the users of FastWorldReset

- Fixed a bug where players weren't being teleported out correctly in /fwr unload

- Made /fwr create and /fwr disable-chunk-reset commands more informative (now tells after create that you can run /fwr create again on the same world to update the template)

- Fixed a bug where it was using "%new line%" instead of "%newline%", surprisingly vanilla Skript does not support space in that, whereas skQuery does and I got it confused (it was throwing error if not having skQuery)

- Now FastWorldReset folder is created on startup even if you do not have any resettable worlds yet, reduces confusion for those who try to find the folder before creating worlds

- Fixed a bug where /fwr info was always showing that the world is using chunk-based reset even if it was using world-based reset

- Made various little things more informative

Also a note, that 2.2.1 skript-reflect from SpigotMC currently does not work correctly with FastWorldReset, download skript-reflect from its GitHub Actions instead, it has fixed version: https://github.com/TPGamesNL/skript-reflect/actions



AND THANK YOU ALL VERY MUCH FOR 1000+ DOWNLOADS!
----------, Feb 17, 2021

so I found that the switch to resetting full world folders isn't as backwards-compatible as expected... starting to reset level.dat file can cause issues if you have mismatching gamerules from the previous system

so I have added a new option:
Code (Text):
#whether it should only reset "region" world folder contents and not other things like level.dat (It's cheaper to reset only region folder, but it doesn't reset world metadata, only the chunks, which may be not what you wish)
ResetOnlyRegionFolder: false
additionally I have added a new command /fwr optimize-template <world>

it will show you the files that may be unneeded in the template and should be deleted, it's only a recommending command, it does not delete anything automatically.
----------, Jan 9, 2021

- Fixed a bug where world-based reset could fail if there is a player in the specified world, now it does teleporting players out in world-based reset too (I thought I can unload worlds without teleporting players out, turns out I was wrong)

- Now when using /fwr create on existing FWR world to update the template, it will update everything in the world folder, not just the "region" folder contents

- Now when resetting a world with world-based reset, it will reset everything in the world folder, not just "region" folder contents, as some data can be saved in other folders within the world folder too (still only resets "region" folder contents for chunk-based reset due to the way it functions)
----------, Jan 8, 2021

1. now uid.dat is deleted on fresh /fwr create, in the template, this solves a problem where you couldn't clone a world due to multiple instances of it being loaded
2. fixed <none> in one message
3. added support for asynchronous teleportations for chunk-based reset (not needed for world-based reset), which was added in Skript 2.5.2
4. now if you try to clone a world that is a clone itself, it'll get the clone's template and clone with it

additionally I've had more testing of the script and I've found some things that are interesting:

- FastWorldReset is very laggy on Windows and Mac OS, however it works very fast on Linux

- FastWorldReset actually works on 1.13-1.16.4, you just need to ignore the errors and optionally disable chunk-based reset (as it does nothing anyway in 1.13+). I am now adding 1.13+ to list of supported versions
----------, Jan 4, 2021

- Added config option AllowCreatingNewWorlds that defaults to false, useful if you wish to be able to create new worlds with FastWorldReset for pasting a schematic with WorldEdit or something into them and then re-running /fwr create to update the template. (Removes the need for another world-management plugin when you only have a schematic of the map you want to use)

- Fixed a bug where a world on world-based reset setting was attempting to use the chunk-based reset

- Fixed a bug where world-based reset message was always sent to console only, instead of the sender as chunk-based reset does

(thanks to Miss_Wafffidooe for finding the last two bugs)
----------, Dec 15, 2020

- Fixed a bug where chunk-based reset could make entity ticking buggy if using Paper with skip-entity-ticking-in-chunks-scheduled-for-unload option set to true. (now it will automatically override that option for that specific world, the override is done in memory, so it won't do any persistent damage)

- Fixed one chat message showing <none> instead of world name

this update is still for 1.12.2 as I have gotten busier and I don't personally yet have a need for FastWorldReset in 1.13+ versions (all my minigames are on 1.12.2)
----------, Dec 8, 2020

This version makes a lot of changes to the code, while I tested it, I may have missed something, so it is recommended to backup your worlds before using it


1.13.2 - 1.16.2 support update is coming next



- Now /fwr delete has a confirmation

- Now /fwr delete deletes the world's template in FastWorldReset folder if it's not a clone, if it's a clone, deletes its world folder

- Now /fwr delete deletes all variables belonging to the world properly, it had forgotten some previously

- Made chunk-based reset faster

- Made world-based reset faster

- Made world cloning faster

- Improved world cloning, fixed a lot of bugs with it

- Fixed a bug in world initialization, some worlds could've been not loaded right in very rare cases

- Now a lot of reflection is cached, which improves performance

- Made more of the code to account for rare bug scenarios

- Removed Skent dependency, this should make this script 1.8.8-compatible, but I did not test on that version and if it doesn't work, you may ask in the discussion for help, but you should be able to get it working pretty easily
----------, Sep 3, 2020

- Fixed a bug where skQuery was still needed for a few lines of code

- Fixed a bug where spawn point of world expression was erroring

- Significantly improved chunk unloading performance (it had ability to add notable extra lag to even non-FastWorldReset worlds due to a mistake of mine)

- Removed some unnecessary code


1.13 - 1.16.2 support is coming soon. I am working on it, but before it I'll make a feature update next. 1.13+ support will drop chunk-based reset due to it not working anymore, but it'll be kept in the 1.12.2 version of the script. luckily in 1.13+ world based reset becomes faster, so this won't be as bad. 1.12.2 and 1.13 will be two separate .sk files downloaded in a .zip

also I found that some servers do not come with apache commons io library by default, on which FastWorldReset depends, usually some plugin uses it and adds it by itself, but if you do not have many plugins, you may run into errors related to FileUtils

in that case, just download it from https://commons.apache.org/proper/commons-io/download_io.cgi and put the jar file in plugins/skript-reflect folder

(this is not needed for most servers, I didn't notice this dependency myself until I tested it on a pretty clean 3 plugins server)
----------, Sep 1, 2020

- Made GovindaSK an optional dependency, if it is not found, it will fall back to using reflection to unload chunks. with GovindaSK unloading chunks is faster, but the speed difference is only visible when you're resetting huge worlds, in small world resetting it's not visible. this change has been made due to some people having issues using GovindaSK as it is not fully released yet.
(2 errors will appear if you don't have GovindaSK, but they can be safely ignored)

- Made the script more portable across different Skript configurations, previously having configured variables starting with "-" character to not save to disk was a must, it is still recommended, but now it'll automatically delete those on startup just in case if the user hasn't configured them to not be saved to disk.
----------, Aug 23, 2020

remade some unused code, so it doesn't error unnecessarily (see the update below for the huge changes I made earlier today)
----------, Aug 23, 2020

I found that some plugins, such as FastAsyncWorldEdit (on 1.12.2, not sure about newer) can cause chunks to unload inconsistently, which breaks chunk-based reset system and sometimes, even makes the world not reset at all, due to failed chunk unloads

this update fixes that problem by detecting if world has been edited improperly by such plugin and then falling back to world-based reset. If you're using FastAsyncWorldEdit and want more performant world resets, it is highly recommended to remove it, as it causes problems after a single block edit in any world, with the problems appearing in all worlds.

Additional improvements:

- moved all of disk operations to separate thread, the most intensive disk operations already were on separate thread, but now I've moved all small ones.

- Fixed a bug where the script was counting script reload as server startup

- Added custom events! on world reset start and on world reset complete, more on them will be explained below.



due to much increased amount of separate thread operations, there's a lot of waiting for other thread to finish, which makes worlds reset a little slower, but at better performance & absolute reliability, you can expect worlds reset to start taking up to 0.2 seconds more, but that is just waiting, no lag.

with increased reset times, comes a need to know when exactly the world has finished resetting, due to which I've added custom events!

you can tell when world starts to reset in any of your scripts with use of these events:
Code (Text):
on start of world reset:
  broadcast "%event-world% is starting to reset!"
then to know when the reset has finished, you use this event:
Code (Text):
on complete of world reset:
  broadcast "%event-world% has completed resetting!"
the on complete of world reset event happens when the world has absolutely finished resetting and is available to be used for anything you wish

It is highly recommended to update to this version if you're using an older version of FastWorldReset as these changes make this script much more reliable and makes it perform far better on HDD disks.
----------, Aug 23, 2020

I found that in the newest 2.0 Skent version, there's again, another bug related to directory copying, so I have done some changes to make it bugless.

- Removed skript-mirror dependency and replaced it with skript-reflect, so I can multi-thread own directory copying instead of using Skent for it (Skent is still used for other things as it works well for that) skript-reflect is a fork of skript-mirror that adds more features to it, fixes various bugs and adds support for newer software, such as Java 13+ and OpenJ9

- Removed skQuery dependency as it was only used to make the code cleaner, but really, it wasn't needed for FastWorldReset functionality

- Removed unnecessary file deletion in directory copying, I'll let users handle these few useless 1kb files in world files themselves


no new features yet, just keeping this script functional
----------, Aug 11, 2020

The new version of Skent addon has made breaking changes to syntax to avoid conflicts a few hours ago, so I've updated FastWorldReset to match the new syntaxes

this means FastWorldReset will no longer work with older versions of Skent, only Skent 2.0+ to which I really recommend updating as the author has fixed many bugs that I've reported which were appearing with FastWorldReset (but I had designed it to go around the bugs, so it wasn't critical, just spammy console)

(I've only tested if the world resets once with this update, I didn't test further, but hopefully it's stable)

I've also added a new optional argument to /fwr create command, you can now specify world generator in process of creation, so you don't have to specify it later with /fwr generator

/fwr create <worldname> [generator]
----------, Jul 20, 2020

Fixed a bug where if you're creating a FastWorldReset world that is already created, it wasn't replacing current world template with a new one
----------, Jul 10, 2020

This is a very big update of FastWorldReset that has been in development for months, it highly speeds up world resets and makes it capable of resetting even 10 minigame worlds simultaneously!

I've also added many other features, including, but not limited to:

- World cloning
- World generators
- Information commands
- Asynchronous file operations
- More noob-friendly design, a lot of informative messages.
- New chunk-based reset system that is incredibly fast! LAGLESS!

please note that this DOES NOT support 1.13 or higher yet, but my next plan is to make a 1.13+ version of this script.

The update has been tested only on 1.12.2 and in a few different servers' production environments.

If you find the reset being too slow, please let me know with a lot of detail in discussion, I'll see what we can do, because this is so fast now that there shouldn't be any problems!

and don't forget to report any bugs! but nothing should be critical, I've been testing this update for months.
----------, Jul 7, 2020

Re-added config option to disable world reset on restart
----------, Jan 14, 2019

This is a very big update which remakes the way how FastWorldReset works.
What's new:
- Now uses FastAsyncWorldEdit to reset worlds without lag!

New dependencies:
- FastAsyncWorldEdit
- skript-mirror

Multiverse-Core is no longer needed and now FWR only works with worlds which aren't part of any world manager (such as Multiverse-Core), so if you want to use FWR with a world in Multiverse-Core, you need to use /mv remove <world> and then /fwr createreset <world>
----------, Jan 14, 2019

Fixed broken deletereset and being able to reset world which isn't resettable
----------, Feb 7, 2018

Resource Information
Author:
----------
Total Downloads: 3,592
First Release: Feb 7, 2018
Last Update: Apr 19, 2024
Category: ---------------
All-Time Rating:
7 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings