MuteBefehl Wiki

BlockLog

Block event log with rollback, restore and death recovery.

BlockLog records every relevant block event (place, break, interact, container transactions) into a SQLite database. It powers /bl inspect, lookup, rollback, restore and death-drop recovery.

How it works

  • One dedicated background writer thread handles all SQLite inserts. Events from the main thread go into a bounded LinkedBlockingQueue, the writer batches them and commits.
  • Natural block spread, form, fade and leaf decay are not logged (keeps inspect output readable).
  • Rollback chains attached blocks together: torches, ladders, signs, plants, doors, beds and double-chest halves are restored as one unit.
  • Death-drop recovery snapshots the inventory at the moment of death and lets staff hand items back without manual reconstruction.

Configuration

BlockLog:
  LoggingActive: true
  QueueSize: 50000
  BatchSize: 500
  FlushIntervalMs: 1000
  NearDefaultRadius: 10
  NearMaxRadius: 100
  NearSinceMs: 604800000
KeyDescription
LoggingActivePause logging without disabling the module (e.g. for bulk admin work). The AdminGUI exposes a live toggle.
QueueSizeMax events buffered between flushes. The queue blocks the producer briefly if it fills up; raise this on very busy servers.
BatchSizeThe writer commits every N events at most. Higher batches = better throughput, slightly more memory.
FlushIntervalMsThe writer also commits on this cadence, even if BatchSize hasn't been reached.
NearDefaultRadiusDefault radius for /bl near.
NearMaxRadiusHard upper bound for /bl near.
NearSinceMsTime window for /bl near (default 7 days).

Storage tuning

  • journal_mode=WAL, synchronous=NORMAL, temp_store=MEMORY, busy_timeout=5000
  • mmap_size=256MB for the BlockLog database specifically
  • Composite indexes: (world, x, y, z) and (player_uuid, timestamp DESC). These replace the old single-column player index and speed up inspect, near and rollback queries dramatically on large datasets.

Permissions

NodeGrants
muteessentials.blockloginspect, lookup, near, death, help
muteessentials.blocklog.rollbackrollback
muteessentials.blocklog.restorerestore
muteessentials.blocklog.deathrestoredeathrestore
muteessentials.blocklog.purgepurge

On this page