Server integrity · Our own plugin

IgniteChunkRecovery

IgniteChunkRecovery finds corrupted and suspicious chunks, scores them, keeps them on a list and lets staff repair them from a menu. It never fixes anything on its own, and its default repair waits for the one moment a region file can be edited safely.

10corruption checks
3,247lines of Java
4repair strategies

The problem

A corrupted chunk can crash the server every time a player walks near it. Finding it means reading logs, and fixing it usually means stopping the server and editing region files by hand.

On a live server there is no public API to regenerate a single chunk safely, and editing a region file while Paper has it open races Paper's own cache.

What we built

  1. 01Live scans that load chunks in throttled batches on their region threads and score them
  2. 02A deep scan that reads raw region files and validates chunk data before the server loads them
  3. 03A scored, saved list of flagged chunks in a paged menu, sorted by score
  4. 04Repairs that clean first, rescan, and only regenerate what is still broken

Technical decisions

The calls that shaped the build, and why we made them.

  • A score, not a yes or no

    Each check that trips adds points, and the total maps to a band. A chunk only joins the list once it reaches the suspicious band, and every threshold lives in config.

  • Read the file before the server does

    The deep scan decompresses each chunk from the region file and parses it itself, off the server thread, so it catches chunks that would crash the server on load. Those are marked file-only and cannot be teleported to.

  • Fix on the next start

    The default repair queues a region-file delete that runs at the next startup, before any world opens: the only race-free window. It cannot run at shutdown, because Paper saves worlds after plugins disable and would write over it.

Stack and size

Counted from the repository

Java
3,247 lines in 37 files
Checks
7 live, 3 deep scan
Commands
9
Platform
Paper and Folia
  • Java 21
  • Paper 1.21
  • Folia
  • IgniteAPI
  • NBT

Need something like this?

Tell us what the server needs. You get a fixed price and a delivery date back, usually the same day.