WorldSlim
PluginLicenseRef-All-Rights-Reserved

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.

99
Downloads
0
Followers
2 months ago
Updated
📦
9
Versions

📖About WorldSlim

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

Server PDC Persistence Registry AutosaveShield
Paper 1.21.x Yes Yes Yes
Purpur 1.21.x Yes Yes Yes
Folia 1.21.x Yes Yes Partial
Leaves 1.21.x Yes Yes Yes
Leaf 1.21.x Stripped Load-bearing Limited

Requires Minecraft 1.21.x and Java 21.


Commands

Command Description
/worldslim status Show plugin status and active configuration
/worldslim stats Total chunks scanned/cleaned and space saved
/worldslim chunk Full decision tree for the chunk you're standing in
/worldslim cleanup Run a cleanup pass immediately
/worldslim diagnose [here] Runtime diagnostic snapshot. Append here for current-chunk details
/worldslim scan Parse the current region file's raw NBT and report what tags survived
/worldslim reload Reload config.yml (also runs config migration)
/worldslim reset Reset 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