Crash Recovery
Snapshots survive restarts and crashed matches restore themselves.
Snapshots live in memory while the server runs, and (by default) on disk too. The disk copy is what saves you when things go wrong.
persist-snapshots: trueWhat it protects you from
With snapshot-each-match: true (the default), a fresh snapshot exists only while a match is running. If the server crashes or is killed mid-match, the arena is left half-destroyed and, without persistence, there would be nothing to repair it with.
With persistence on, the snapshot file is still there at the next start. Duel-Regen notices, logs it, and restores the arena automatically:
[Duel-Regen] Loaded 1 persisted snapshot(s): Arena2
[Duel-Regen] Arena 'Arena2' has a snapshot from before an unclean shutdown - restoring it.
[Duel-Regen] Arena Arena2 regenerated in 43msNo commands needed. By the time players join, the arena is clean.
How it works
- The snapshot is written to
plugins/Duel-Regen/snapshots/right after capture, in the background, so it never blocks the server tick. - Writes go to a temporary file first and are renamed into place, so a crash during the write cannot corrupt an existing snapshot.
- The file is deleted whenever its snapshot is used up or removed, so disk always mirrors memory.
- A snapshot saved on a different Minecraft version, or a damaged file, is skipped with a console warning instead of restoring garbage.
See Storage for the file formats and folder layout.
Turning it off
Set persist-snapshots: false if you really do not want snapshot files on disk. Regeneration keeps working normally within a session; you only lose restart survival and crash recovery.