Mineuniverse
Log in Register
Plugins

ChestToLoot

Copy & refill vanilla chests with a cooldown — while ignoring player-placed chests, respecting claim.
by Maraudeur001
Download Claim this project
17 downloads
0 likes
Updated Jun 30, 2026
0 hypes
Anti-Griefing Tools General Mechanics Miscellaneous Role Playing

ChestToLoot

Copy & refill vanilla chests with a cooldown — while ignoring player-placed chests, respecting claims (GriefPrevention / GriefDefender), and staying gentle on TPS with a time-budgeted scanner.

I built this to stop server-wide “razzia” runs—when one player (intentionally or not) clears every chest—so everyone still gets a chance to loot, even if others got there first. It boosts replayability and makes the server more welcoming to new players.

  • MC/Server: Spigot/Paper 1.12.x
  • Version: 1.0.0

What it does

ChestToLoot discovers world-generated chests, snapshots their contents once, and then refills them after a cooldown when players loot them.

Snapshot + refill flow

  • Snapshots discovered world chests (once), storing their contents as a template.
  • When a player loots/changes a managed chest, it’s marked dirty and refills after a cooldown.

What it skips

ChestToLoot will not manage:

  • Player-placed chests (persisted to exclusions.yml)
  • Chests inside configured colony/town centers
  • Chests inside GriefPrevention / GriefDefender claims (configurable)

Villager safety guard (optional)

  • Can block refills near villagers (configurable) to avoid interfering with gameplay or villages.

Lightweight world scanning (TPS-friendly)

Designed to avoid heavy world iteration:

  • Enumerates generated chunks directly from .mca region headers (no worldgen)
  • Processes only a few chunks & chests per tick using a hard time budget
  • Keeps a ledger (scanned-chunks.yml) so each chunk is scanned only once

Admin tools

Commands include:

  • /ctl status — live progress (queues, managed count, throttle)
  • /ctl pause / /ctl resume — control scanning
  • /ctl speed <chunks> <chests> — adjust throttles live
  • /ctl save — flush all data files

Optional hook:

  • Per-chest discovery console hook (alsoRunConsoleCommand)

How it decides to refill

  • A chest is snapshotted once when first seen
    (unless it’s empty and onlySnapshotIfNonEmpty=true).
  • A chest becomes dirty only when players change it via GUI interactions
    (click/drag/close events). Automation/NPC-driven changes typically won’t mark it dirty.
  • After resetMinutes, the chest is restored to the template unless blocked by:
    • claims
    • configured town/colony centers
    • villager guard

Tip: This design focuses on replenishing player-lootable chests without fighting other systems.


Integrations

GriefPrevention (reflection)

  • Skips snapshot/refill inside claims
  • Optional: don’t respawn broken chests inside claims

GriefDefender (reflection, best-effort)

  • Same idea as above when the API bridge is present and enabled

MineColonies / Town centers

  • Protect zones via a configured colonyCenters list

Container support

  • Supports vanilla chest blocks: CHEST, TRAPPED_CHEST
  • Mod storage blocks are not targeted.

Commands & permissions

Commands

/chesttoloot or /ctl:

  • status — show queues, managed count, % scan discovered, throttle, task state
  • pause / resume — control the scanner
  • speed <chunks> <chests> — adjust throttles live
  • save — flush all data files

Permission

  • chesttoloot.admin (default: op)

Installation

  1. Drop ChestToLoot-1.0.0.jar into plugins/
  2. Start the server once to generate config files
  3. Edit config.yml to taste, then /reload or restart
  4. Optional plugins: GriefPrevention / GriefDefender (for claim awareness)

Built for Spigot or Paper 1.12.x (built against spigot-api:1.12.2).


FAQ

If a claim is created over an already-managed chest

The snapshot remains in data, but refills are skipped inside claims. If the chest is broken and respectClaimsOnRespawn=true, CTL forgets it instead of respawning.

Does it cover previously placed player chests?

No — player-placed chests are excluded at place time and recorded permanently in exclusions.yml.

Modded inventories?

ChestToLoot targets vanilla chest blocks only. Other containers (drawers, crates, etc.) aren’t scanned/managed.

ChestToLoot-1.0.0.jar
MC 1.12
Release 2025-12-15 Get

More from Maraudeur001

WelcomScreen
70
SpiritLinks
46
MobRepeller
127
SpiritLinks
121

You Might Also Like

MobHealth
Simple plugin to let you know the damage you just caused to a mob, and how much health it has left.
989,881
Player Heads
Lop off Player and all Mob Heads with configurable drop rates + pvp-farming nerf, includes detailed commands and permissions
979,351
Advanced Item Effects
Adds custom effects to any item including potion effects.
97,290
VoxelMore
"Sharing is caring."
9,999
SunSteel
A Golden Item Enhancement Plugin
9,880
Sneaker
Hide name tags above players' heads.
9,865