ChestToLoot: Auto-Restore Loot in Minecraft Chests

What Is ChestToLoot and Why Your Server Needs It Every Minecraft server admin knows the frustration: a single player logs in, sprints through every generated structure, and vacuums up all the loot before anyone else gets a chance. Whether intentional or just bad timing, these “razzia” runs leave ...

Download ChestToLoot for Minecraft 1.12

Original name: ChestToLoot

Minecraft: 1.12

FileVersionLoaderSize
ChestToLoot-1.0.0.jar1.12—31 КБDownload

What Is ChestToLoot and Why Your Server Needs It

Every Minecraft server admin knows the frustration: a single player logs in, sprints through every generated structure, and vacuums up all the loot before anyone else gets a chance. Whether intentional or just bad timing, these “razzia” runs leave new players staring at empty chests and wondering why the world feels so barren. ChestToLoot is a lightweight Spigot/Paper plugin built specifically to solve that problem. It silently watches over vanilla chests in the world, snapshots their original contents, and refills them after a configurable cooldown — all while respecting player-built chests, land claims, and server performance.

How the Snapshot and Refill System Works

The plugin’s logic is refreshingly straightforward. When ChestToLoot first discovers a naturally generated chest — think dungeons, temples, mineshafts, or strongholds — it takes a one-time snapshot of the inventory and stores it as a template. That template becomes the permanent blueprint for that specific chest. From then on, whenever a player opens the chest and changes its contents through normal GUI interactions (clicking, dragging, closing), the chest is marked as “dirty.” After a set number of minutes, the plugin silently restores the chest to its original template, ready for the next adventurer.

This design deliberately ignores automation and NPC-driven changes, so hoppers, redstone contraptions, or modded systems won’t accidentally trigger a refill. The focus stays squarely on replenishing player-lootable chests without fighting other mechanics.

What ChestToLoot Skips

Not every chest in the world should be managed. The plugin automatically excludes:

  • Player-placed chests — recorded permanently in exclusions.yml at placement time.
  • Chests inside configured colony or town centers (MineColonies support).
  • Chests within GriefPrevention or GriefDefender claims — configurable, and can even prevent respawning broken chests inside claims.
  • Chests near villagers — an optional villager safety guard blocks refills to avoid interfering with village mechanics.

This selective approach means your players’ own storage stays untouched, and protected areas remain exactly as the claim owners left them.

TPS-Friendly World Scanning

One of the biggest concerns with any world-scanning plugin is lag. ChestToLoot was designed from the ground up to be gentle on server ticks. Instead of iterating over every loaded chunk, it reads generated chunk coordinates directly from .mca region file headers — no world generation needed. It then processes only a few chunks and chests per tick, using a hard time budget to stay within safe limits. A persistent ledger (scanned-chunks.yml) ensures each chunk is scanned exactly once, so the initial discovery phase is a one-time cost that gradually fades into the background.

While ChestToLoot is a server-side plugin that admins drop into the plugins/ folder, players who enjoy modded Minecraft often look for a hassle-free way to manage their own modpacks. The foxygame.net launcher offers exactly that — a modern, flexible launcher where you can browse and install mods directly from its menu, making it a convenient companion for anyone who wants to keep their client-side experience just as polished as the server.

Admin Tools and Live Control

ChestToLoot puts you in the driver’s seat with a clean set of commands, all under /chesttoloot or the shorter /ctl alias. The status command gives a real-time dashboard: current scan progress, number of managed chests, throttle settings, and task state. You can pause and resume scanning on the fly, adjust the speed with /ctl speed <chunks> <chests>, and force a data flush with /ctl save. There’s even an optional per-chest discovery hook that can run a console command, opening up custom logging or notification workflows.

All administrative functions require the chesttoloot.admin permission, which defaults to operators. This keeps control in the right hands while leaving the plugin completely invisible to regular players.

Seamless Integration with Protection Plugins

If your server already runs GriefPrevention or GriefDefender, ChestToLoot will automatically detect them via reflection and skip any chests inside claims. The integration is best-effort but thoroughly tested — it won’t snapshot or refill chests in protected areas, and with respectClaimsOnRespawn enabled, it will even forget a managed chest if it gets broken inside a claim rather than respawning it. For MineColonies servers, you can define a list of colony center coordinates to protect entire towns.

This claim awareness means you can layer ChestToLoot on top of your existing protection setup without conflicts. The plugin simply steps aside wherever players have built their own safe zones.

Installation and Configuration

Getting started takes only a few minutes:

  1. Place ChestToLoot-1.0.0.jar into your server’s plugins/ directory.
  2. Start the server once to generate the default config.yml and data files.
  3. Edit config.yml to set your preferred cooldown (resetMinutes), throttle values, and claim-related options.
  4. Run /reload or restart the server to apply changes.

The plugin is built for Spigot and Paper 1.12.x, targeting the spigot-api:1.12.2. It only manages vanilla chest blocks (CHEST and TRAPPED_CHEST), so modded storage containers like drawers or crates are left alone. If you later add GriefPrevention or GriefDefender, ChestToLoot will pick them up automatically after a reload.

Why ChestToLoot Boosts Replayability

Empty worlds drive players away. When every dungeon has already been picked clean, exploration loses its thrill. ChestToLoot restores that sense of discovery by ensuring that generated loot is always available — not instantly, but after a fair cooldown. This simple mechanic makes your server more welcoming to newcomers, who can still stumble upon treasure even if they join days or weeks after launch. It also encourages repeat visits to favorite structures, knowing that the rewards will eventually return.

By focusing only on world-generated chests and respecting player claims, the plugin strikes a balance between fairness and player autonomy. No one’s personal stash gets reset, and protected bases remain untouched. The result is a server that feels alive and generous without undermining anyone’s hard work.

Final Thoughts

ChestToLoot fills a niche that many server admins have struggled with for years: how to keep vanilla loot accessible without breaking immersion or performance. Its snapshot-and-refill model is elegant, its claim integration is thoughtful, and its TPS-aware scanner means you won’t have to choose between fairness and lag. Whether you run a small community server or a large public network, this plugin quietly ensures that every player gets a fair shot at the world’s treasures. Drop it into your plugins folder, tweak the cooldown to your liking, and watch your world become a little more welcoming overnight.