Death Swap Guides

Death Swap · Release 3.0.1

Map Pool Guide

One regular Overworld is shared by the named Classic/Kit match slots. Each slot leases a separate prepared area. Your permanent lobby and other minigames stay in their existing world.

Area sizes

Two players: 500 × 500. Three: 800 × 800. Four: 1100 × 1100. Five: 1400 × 1400. Six: 1700 × 1700. Seven: 2000 × 2000. Eight: 2300 × 2300. Size locks at actual match start, so later eliminations never shrink it. The gap defaults to 512 blocks in addition to generated padding. Personal borders and server checks keep ordinary participants in their assigned area. Operators/admins retain command and access privileges.

Preparation and water

All allowed sizes and their safe spawns are generated before matches receive a ready area. Terrain is vanilla noise/surface/caves/structures, not inherited from a void lobby generator. Every surface column within every supported size is counted; water and surface ice count toward the cap. Exactly 30% is allowed; above it is rejected. A config may lower the cap. A candidate with no safe land spawns is also rejected. Bounded candidate attempts prevent an unending search; failure quarantines the weekly world for inspection/renewal.

Pre-generation is substantial, especially for three 2300-block areas. It is throttled by shared-world.performance and the existing chunk settings; by default it runs only while no players are online on this backend. You can deliberately allow online generation with world-pool.require-empty-server: false. Generated chunks are released rather than all kept in RAM. /ds pool shows progress. The physical world includes buffer/rejected terrain outside playable areas; the size formula describes playable borders.

Reset window

After a match its area is unavailable. No new area assignments start while rollback drains; already assigned countdowns/running matches continue. One-player waiting reservations cannot hold maintenance indefinitely. After all matches and tracked spectators exit, the controller requests chunk eviction in bounded batches, waits for zero FULL chunks and resident holders plus idle world I/O, then detaches the empty world on the main thread. The entire original save is restored by the disk worker. This includes terrain, containers, entities, POI, saved scheduled ticks and world-save files. No live region files are overwritten. An untracked visiting admin must leave before unload; the plugin does not forcibly teleport them.

This deliberately waits for a safe window rather than immediately rolling back one area under other players. Used areas never become available before restoration. Corrupt archives, unsafe paths or missing known baselines fail closed and keep files for inspection. Restore uses verified staged extraction/atomic replacement. External plugin databases, statistics, player snapshots and economy ledgers are outside world rollback.

Weekly renewal

After seven elapsed days the world retires once matches finish. No new assignments are made during retirement. Only its exact token-owned folder and baseline are removed. A new identity and random seed are created, then the areas are fully prepared. The new week's generation obeys the local idle setting. The GUI can queue renewal early. Registry state allows interrupted retirement to resume safely.

Storage and migration

shared-world.yml is the generated ownership/area registry; do not hand-edit it. The immutable template is in plugins/DeathSwap/templates/. 1.x keeps the owned world in plugins/DeathSwap/worlds/dsarena_UUID/. Later 26.x uses <main-world>/dimensions/deathswap/dsarena_UUID/; 26.1.1 alpha uses dimensions/minecraft/deathswap/. Never snapshot/delete the primary world or unrelated dimensions.

Back up the plugin folder AND actual owned world/dimension storage together. Keep space for baseline plus staged and temporary old copies. Old 2.x arenas.yml, world folders and templates are retained for inspection, not reused by the new controller. Do not remove player recovery records or ledgers when migrating.

Resource controls in 3.0.1

generation-inflight: 1 includes both generation and pending snapshot analysis; it is a global shared-world limit. Spawn candidates are capped at 512 samples for each supported size during scanning and released after selecting eight spawns. The world is never copied into a Java heap arena snapshot.

maximum-loaded-chunks: 128 and maximum-resident-holders: 1024 pause new generation admission while the engine drains existing work. These are admission thresholds, not hard engine limits: one request can require neighboring proto chunks. maximum-heap-percent: 75 and maximum-average-tick-ms: 40 pause new generation under pressure. Normal chunk eviction continues during a pause. The plugin never forces GC or raises server memory/watchdog settings.

Eviction requests run every five ticks, at most eight chunks per pass. Player/server tickets remain under the server's control; the plugin does not force-unload occupied chunks. Normal engine eviction may take time. Before unavoidable world detach, the drain requires 40 quiet ticks. Generation and shared reset run sequentially. Archive capture, verified extraction and file replacement run on one worker with interruptible streaming. Bukkit world creation, snapshots, tickets and final detach stay on the main thread.

Unused prepared areas have zero DeathSwap spawn tickets. A waiting reservation warms only its selected player spawns (two for a 1v1, up to eight). When the roster changes those tickets are replaced and the countdown pauses until ready. Tickets are released on entry or cancellation. A canceled reservation that never entered an arena does not force a world rollback.

Use /ds pool to see preparation or budget-pause progress. A server still needs disk space for a baseline and staged restore, and enough memory for normal Minecraft chunk generation. Three 2300-block areas are substantial: prepare them during an empty-server window. Do not use a larger heap or watchdog timeout as a substitute for investigating a stall.

The disposable working world keeps autosave enabled. On the tested 1.20.4 chunk system, disabling it also disables normal chunk unload processing; this was an additional cause of retained proto-chunk holders. Normal engine saves go to the working copy, then the immutable original replaces it after the drained detach. Spawn material safety sets are reused and each column's safety is calculated once, avoiding repeated allocation for every arena size.