COWMODSКаталог модов

WorldSlim

A lightweight chunk save optimization plugin for Paper servers. WorldSlim reduces your world file size by automatically cleaning up chunks that players have barely visited.

Автор: babyxxi2710обновлён 29 апр. 2026 г.
УправлениеОптимизацияХранение

Описание

WorldSlim

Reduce Minecraft world file size by automatically cleaning chunks that players barely visit. Three layers of defense catch what vanilla autosave would otherwise commit to disk.


What it does

Modern Minecraft (1.18+) keeps chunks loaded much longer than a player's view distance, and autosave writes them all to disk regardless of activity. WorldSlim hooks every layer of that pipeline:

  1. ChunkUnloadListener — when a chunk does unload, intercept the save if InhabitedTime is low.
  2. AutosaveShield (new in 2.0) — every 2 seconds, pre-emptively clear the dirty flag on loaded low-InhabitedTime chunks so autosave skips them.
  3. ChunkCleaner — periodically rewrite region files, removing chunks that slipped through the first two layers.

Player activity (placing blocks, attacking mobs, opening containers, picking up / dropping items) marks chunks as "force-save" so they survive cleanup.


Highlights

  • Three-layer architecture — unload + autosave + region rewrite. Aggressive without being unsafe.
  • File-based ChunkRegistry — managed/force-save state stored in plugins/WorldSlim/data/, survives server restarts and Leaf/Moonrise's chunk-PDC strip. Crash-safe (lost marks degrade to "leave it alone").
  • Aggressive mode (cleanup.aggressive: true) — restores the pre-1.0.6 cleanup logic, achieves 90%+ cleanup rate on fresh servers. Off by default to protect builds on established worlds.
  • Diagnostics — /worldslim diagnose for runtime counters, /worldslim scan for raw-NBT inspection of any region file, /worldslim chunk for full decision-tree of the chunk you're standing in.
  • Daily-rotating file logger at plugins/WorldSlim/logs/, configurable level.
  • Config migration (new in 2.0.1) — new fields auto-injected on upgrade, preserving your edits and comments.
  • Async + bounded — every disk operation runs off the main thread, with a 5-second timeout that safely skips when the server is busy.

Compatibility

ServerPDC PersistenceRegistryAutosaveShield
Paper 1.21.xYesYesYes
Purpur 1.21.xYesYesYes
Folia 1.21.xYesYesPartial
Leaves 1.21.xYesYesYes
Leaf 1.21.xStrippedLoad-bearingLimited

Requires Minecraft 1.21.x and Java 21.


Commands

CommandDescription
/worldslim statusShow plugin status and active configuration
/worldslim statsTotal chunks scanned/cleaned and space saved
/worldslim chunkFull decision tree for the chunk you're standing in
/worldslim cleanupRun a cleanup pass immediately
/worldslim diagnose [here]Runtime diagnostic snapshot. Append here for current-chunk details
/worldslim scanParse the current region file's raw NBT and report what tags survived
/worldslim reloadReload config.yml (also runs config migration)
/worldslim resetReset cleanup statistics

Aliased to /ws. Permission: worldslim.admin for mutating commands; worldslim.use for the read-only ones.


Quick start

  1. Drop the jar in plugins/, restart.
  2. Default config is conservative (preserves any chunks that look pre-existing). Works without configuration on most servers.
  3. On a fresh server — set cleanup.aggressive: true for the best cleanup rate.
  4. On an established server with builds — leave aggressive: false (default) and let the registry track new chunks going forward.

Configuration highlights

# Chunk lifetime threshold. Below this, chunks may be cleaned.
# Default 1200 ticks = 60 seconds.
min-inhabited-time: 1200

cleanup:
  interval-minutes: 30
  run-on-startup: false
  # Pre-1.0.6 cleanup behavior. Highly recommended for fresh servers.
  aggressive: false

autosave-shield:
  enabled: true
  interval-ticks: 40   # 2s

logging:
  file-enabled: true
  level: INFO          # DEBUG / INFO / WARN / ERROR

worlds:
  enabled: []          # if non-empty, ONLY these worlds are managed
  disabled: []         # always-skipped worlds

Full default config (with all comments) is generated on first run.


Reporting issues

Please include:

  • /worldslim diagnose screenshot
  • Latest log from plugins/WorldSlim/logs/
  • Server type and version

Последние версии

Все версии →
release

WorldSlim 2.0.1

2.0.1
29 апр. 2026 г.180Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9folia, paper, purpur
Скачать
Что нового
# WorldSlim 2.0.1 > Minor release. Quality-of-life improvements on top of 2.0.0. Drop-in upgrade — no manual steps required from 2.0.0. Two focused changes that make 2.x easier to operate: configs auto-update across versions, and `/worldslim chunk` now explains exactly why each chunk is kept or deleted. --- ## What's New ### Config Migration Adds a `config-version` field to `config.yml`. On every plugin reload, the migrator walks the jar's default config and copies any missing keys into your on-disk file. - User-edited values are preserved (your `min-inhabited-time: 1500` stays `1500`) - Existing comments survive the load + save round-trip - New keys arrive with their default comments attached - Original file is backed up to `config.yml.bak.v<old>` before any mutation - If migration fails for any reason, the original is restored from backup automatically This means future updates that introduce new config sections (e.g. v2.1 will add `worlds.overrides`) will not require manual edits — your existing config gets the new fields appended on first reload, with their defaults and documentation intact. ### `/worldslim chunk` — Full Decision Tree The previous output (one line "would be kept: yes/no") only looked at `InhabitedTime` and gave misleading answers. The new output shows every signal that affects the cleanup decision plus four verdicts mirroring the actual runtime behavior: ``` === Current chunk decision path === [123, -456] @ world --- State signals --- managed (registry): yes managed (PDC): no pre-existing (PDC): no force-save (registry): no force-save (PDC): no loaded (now): yes InhabitedTime: 340 ticks (17s) < 1200 threshold aggressive mode: OFF --- Verdicts --- > Current (loaded): KEEP (loaded chunks are always protected) > Hypothetical unloaded, aggressive=OFF: DELETE (low InhabitedTime, no force-save, not loaded) > Hypothetical unloaded, aggressive=ON: DELETE (low InhabitedTime, no force-save, not loaded) > ChunkUnloadListener: BLOCK SAVE (low InhabitedTime, NMS unsaved=false) ``` The decision logic is taken directly from `ChunkCleaner.rewriteRegionFile` and `ChunkUnloadListener.onChunkUnload`, so what you see here is what would actually happen at cleanup or unload time. The plugin's actual chat output is localized (Simplified Chinese in 2.0.x); the structure shown above mirrors it 1:1. --- ## Compatibility - **From 2.0.0**: drop-in. Migration only adds the `config-version: 2` marker; nothing else changes because v2.0.0 already had all the current fields. - **From 1.x**: drop-in. Migration auto-injects `cleanup.aggressive`, `autosave-shield.*`, and `logging.*` with their defaults and comments. Your `config.yml.bak.v1` keeps the original file safe. - **Server forks**: unchanged from 2.0.0 — Paper / Purpur / Folia / Leaves / Leaf 1.21.x all supported. Requires Minecraft 1.21.x and Java 21. --- ## Verification End-to-end tested on Leaf 1.21.11 with a synthesized v1 config (no `config-version`, no `aggressive`, no `autosave-shield`, no `logging`): | Check | Result | |-------|--------| | 6 user-edited values preserved | Yes | | 8 missing fields injected with defaults | Yes | | Comments preserved on existing keys | Yes | | Comments attached to newly-added keys | Yes | | Backup written to `config.yml.bak.v1` | Yes | | `/worldslim chunk` decisions match `ChunkCleaner` runtime | Yes | --- ## Reporting Issues When filing a bug, please include: - `/worldslim diagnose` screenshot - `/worldslim chunk` output for an affected chunk - Latest log from `plugins/WorldSlim/logs/` - Server type and version (Paper / Leaf / etc.)
beta

WorldSlim 2.0.0-beta

2.0.0-beta
20 апр. 2026 г.12Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9folia, paper, purpur
Скачать
Что нового
# WorldSlim 2.0.0-beta > **Beta release — architectural overhaul.** Back up `plugins/WorldSlim/` before upgrading from 1.x. Major rewrite to properly handle MC 1.18+ chunk behavior. 1.0.x worked by intercepting chunk unloads, but modern MC keeps chunks loaded much longer and autosave writes them to disk before any unload event fires. This version rebuilds the architecture around that reality. --- ## What's New ### File-Based Chunk Registry Managed and force-save chunk states are now stored in `plugins/WorldSlim/data/` instead of the chunk's PersistentDataContainer. **Why it matters:** Leaf / Moonrise silently strips Bukkit PDC data when chunks are saved — on 1.0.x this caused the cleaner to see every chunk as "pre-existing" and delete nothing. The registry survives restarts and doesn't depend on server fork behavior. - In-memory `ConcurrentHashMap` with O(1) lookups - Async flush every 30 seconds, synchronous flush on shutdown - Crash-safe: lost marks degrade to pre-existing (never accidentally deleted) - Works identically on Paper, Purpur, Folia, Leaves, and Leaf ### AutosaveShield A background task that periodically resets the NMS `unsaved` flag on loaded low-inhabited managed chunks, so autosave skips them. - Runs every 2 seconds by default (configurable) - Targets only chunks that are managed + low InhabitedTime + not force-saved - On supported cores (Paper, Purpur), it achieves zero disk writes for pure-exploration chunks - Limited effect on Moonrise (it has its own dirty tracking); pair with aggressive mode below ### Aggressive Mode Set `cleanup.aggressive: true` in `config.yml` to restore pre-1.0.6 behavior: any chunk below the InhabitedTime threshold without force-save gets cleaned, regardless of managed status. - **Recommended for fresh servers** — cleanup rate jumps back above 90% - **Not recommended for established worlds** with builds on briefly-visited chunks (signs, dust, fast stops) — those may have low InhabitedTime and would be deleted ### Diagnostics - **`/worldslim diagnose [here]`** — full runtime snapshot (event counts, marking sources, unload decisions, cleanup breakdown, registry totals). Add `here` to inspect the chunk you're standing in. - **`/worldslim scan`** — dumps the NBT structure of your current region file so you can verify whether PDC actually persists on your server fork. - **File logger** at `plugins/WorldSlim/logs/worldslim-YYYY-MM-DD.log`, daily rotation, level-configurable. --- ## Fixes - **Paper 1.20.5+ NBT key compatibility** — chunk PDC was renamed from `BukkitValues` to `ChunkBukkitValues`; 1.0.x never recognized it. The parser now accepts both. - **Main-thread deadlock** — `getLoadedChunks()` could block forever and latch the "cleanup in progress" state. 5-second timeout added; timeouts safely skip the world. - **Registry / disk drift** — removal marks are now deferred until the region rewrite atomically commits. Aborted rewrites no longer corrupt the registry. - **Windows region-file loss** — three-tier fallback switched to a backup-rename pattern; any failure is now recoverable. - **NPE on post-rewrite timeout** — the loaded-chunks recheck no longer crashes when the callback times out. - **`/worldslim scan` server freeze** — removed the synchronous `World.save()` call that stalled the server for seconds. - **`/worldslim cleanup` misleading message** — now correctly reports "cleanup skipped: another run is in progress" instead of falsely claiming completion. - **Large-world cleanup slowdowns** — removed per-region main-thread round-trip; saves hundreds of synchronization bounces per run. --- ## Compatibility | Server | PDC Persistence | Registry | AutosaveShield | |--------|-----------------|----------|----------------| | Paper 1.21.x | ✅ | ✅ | ✅ | | Purpur 1.21.x | ✅ | ✅ | ✅ | | Folia 1.21.x | ✅ | ✅ | ⚠️ partial | | Leaves 1.21.x | ✅ | ✅ | ✅ | | Leaf 1.21.x | ❌ stripped | ✅ **load-bearing** | ⚠️ limited | Requires Minecraft 1.21.x and Java 21. --- ## Upgrade from 1.x 1. **Back up** `plugins/WorldSlim/` (config + any future data). 2. Replace the jar with `WorldSlim-2.0.0-beta+mc1.21.x.jar`. 3. Restart the server. The plugin will append new config fields (`cleanup.aggressive`, `autosave-shield.*`, `logging.*`) to your existing `config.yml`. 4. On **fresh worlds**, set `cleanup.aggressive: true` for best cleanup rate. 5. On **established worlds**, keep `aggressive: false` and trust the registry to track new chunks going forward. --- ## Reporting Issues When filing a bug, please include: - `/worldslim diagnose` screenshot - `/worldslim scan` output from the affected world - Latest log from `plugins/WorldSlim/logs/` - Server type and version (Paper / Leaf / etc.)
release

WorldSlim 1.0.6

1.0.6
20 апр. 2026 г.9Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9paper
Скачать
Что нового
Fixed data-loss bug from v1.0.5 and earlier on existing worlds. Fixes: Force-save PDC flag is now permanent (was one-time, causing ChunkCleaner to delete force-saved chunks after first save cycle) Pre-existing chunks (generated before plugin install) are now permanently protected from cleanup via a new managed-chunk tag New chunks are marked via ChunkPopulateEvent and only those are subject to cleanup Known issues (addressed in v2.0.0-beta): Leaf/Moonrise strips chunk PDC on save; managed tag was lost after restart Paper 1.20.5+ renamed BukkitValues to ChunkBukkitValues; NBT parser missed it ChunkCleaner could deadlock waiting for main-thread callback on busy servers
release

WorldSlim 1.0.5

1.0.5
20 апр. 2026 г.6Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9paper
Скачать
Что нового
Added container-open trigger to protect looted structure chunks. Features at this version: InhabitedTime-based chunk cleanup (region rewrite) Force-save triggers: block place/break, entity damage, item pickup/drop, container open Configurable trigger ranges Known issue: Reports of data loss when installed on existing worlds and restarted — fixed in v1.0.6+ via pre-existing chunk protection.
release

WorldSlim 1.0.4

1.0.4
20 апр. 2026 г.7Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9paper
Скачать
Что нового
Incremental improvement release.
release

WorldSlim 1.0.3

1.0.3
20 апр. 2026 г.9Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9paper
Скачать
Что нового
Incremental improvement release.
release

WorldSlim 1.0.2

1.0.2
20 апр. 2026 г.9Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9paper
Скачать
Что нового
Incremental improvement release.
release

WorldSlim 1.0.1

1.0.1
20 апр. 2026 г.6Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9paper
Скачать
Что нового
Early release of WorldSlim chunk save optimization plugin. Features: InhabitedTime-based chunk cleanup Force-save triggers on block place/break Targets Minecraft 1.21.x on Paper-based servers.
alpha

WorldSlim-1.0.0+mc1.21.x

1.0.0
6 февр. 2026 г.33Minecraft: 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9paper
Скачать
Что нового
# WorldSlim v1.0.0 — Initial Release First public release of WorldSlim, a chunk save optimization plugin for Paper 1.21.x. ## Features - Automatic cleanup of low-activity chunks by rewriting region files - Configurable inhabited time threshold (default: 1200 ticks / 60 seconds) - Scheduled cleanup at configurable intervals (default: 30 minutes) - Smart chunk protection triggers: - Block place / break - Entity damage - Item pickup / drop - All triggers support configurable chunk radius - Per-world enable/disable settings - Async processing — zero TPS impact - Built-in statistics tracking (chunks scanned, cleaned, space saved) - Commands: /worldslim (alias: /ws) with subcommands: status, stats, chunk, cleanup, reload, reset - Debug mode for detailed cleanup logging ## Requirements - Paper 1.21.x - Java 21+