Chest Refill

ChestRefill is a loot refill and randomization plugin for Minecraft servers. It lets you refill nearby chests and barrels using configurable probabilities, random slot placement, and strict per-container limits. Created by zJuqni

140

Chest Refill

ChestRefill

ChestRefill is a loot refill and randomization plugin for Minecraft servers (Arclight/Bukkit). It refills nearby exact chest item copy and exact chest item copy with configurable exact chest item copy, exact chest item copy, strict per-container limits, and support for exact chest item copy plus exact chest item copy.

Compatible with: - Arclight 1.21.1 (Bukkit/Spigot API)

What it does

- Scans loaded blocks only around the player in a range. - Finds containers: - Chests (single + double) - Trapped chests - Barrels - Refills each container from a config loot pool: - Weighted chance per entry (`chancePercent`) - Random slot placement (not sequential) - Supports: - `itemsPerContainer` (separate chest/barrel) - `maxPerItemPerContainer` (default + overrides) - `allowDuplicates` - `clearBeforeRefill` (fresh refill) or fill only empty slots - Optional random amount per stack (`amountMin/amountMax` or global min/max)

New features

- 1-based: - Use namespaced ids like `modid:item_name` in `loot` and `lootMap`. - Unknown/invalid ids are skipped safely with console warnings. - 1-based: - Command: `/savechest <x> <y> <z>` - Reads that container and saves non-empty slots into `savedItems` in config. - Preserves exact `ItemStack` data (meta/lore/enchants/custom NBT data carried by stack serialization). - Slot index is 1-based (first slot = 1, fourth slot = 4). - You can reference saved slots directly in loot: - `item: 4` - `savedSlot: 32` - `item: saved:32` - Also supported in `lootMap`: - `4: 25` - `saved:32: 10`

Commands

- `/chestrefill <range>`: Refill nearby containers in range. - `/chestrefill reload`: Reload config safely. - `/savechest <x> <y> <z>`: Save exact container contents by slot into `savedItems`.

Permissions

- `chestrefill.use`: use `/chestrefill <range>` - `chestrefill.admin`: use `/chestrefill reload` and `/savechest`

Important limits

- Does not scan the whole world. - Does not force-load chunks. - Scans only loaded chunks to reduce lag. - Runs in batched scheduled ticks to avoid freezing. - Loot output varies per run due to weighted random + limits.

Requirements

- Arclight server with Bukkit/Spigot plugin support. - Java 21. - No client mod required.

---

ChestRefill

ChestRefill es un plugin de refill de loot y aleatorización para servidores Minecraft (Arclight/Bukkit). Rellena copiado exacto de cofre y copiado exacto de cofre cercanos con copiado exacto de cofre, copiado exacto de cofre, límites estrictos por contenedor, y soporte para copiado exacto de cofre + copiado exacto de cofre.

Compatible con: - Arclight 1.21.1 (API Bukkit/Spigot)

¿Qué hace?

- Escanea solo bloques cargados alrededor del jugador. - Encuentra contenedores: - Cofres (simples + dobles) - Cofres trampa - Barriles - Rellena cada contenedor desde un loot pool en config: - Probabilidad ponderada por entrada (`chancePercent`) - Colocación en slots aleatorios (no secuencial) - Soporta: - `itemsPerContainer` (separado cofre/barril) - `maxPerItemPerContainer` (default + overrides) - `allowDuplicates` - `clearBeforeRefill` (vaciar y refill fresh) o solo slots vacíos - Cantidades aleatorias por stack (`amountMin/amountMax` o min/max global)

Novedades

- 1-based: - Puedes usar ids con namespace como `modid:item_name` en `loot` y `lootMap`. - Si un id no existe, se ignora sin crashear y se muestra warning en consola. - 1-based: - Comando: `/savechest <x> <y> <z>` - Lee el contenedor y guarda los slots no vacíos en `savedItems` dentro de la config. - Conserva el `ItemStack` exacto (meta/lore/enchants/NBT personalizado serializable). - Los slots son 1-based (primer slot = 1, cuarto slot = 4). - Puedes referenciar esos slots guardados en loot: - `item: 4` - `savedSlot: 32` - `item: saved:32` - También en `lootMap`: - `4: 25` - `saved:32: 10`

Comandos

- `/chestrefill <rango>`: rellena contenedores cercanos. - `/chestrefill reload`: recarga config de forma segura. - `/savechest <x> <y> <z>`: guarda el contenido exacto del contenedor por slot en `savedItems`.

Permisos

- `chestrefill.use`: usar `/chestrefill <rango>` - `chestrefill.admin`: usar `/chestrefill reload` y `/savechest`

Límites importantes

- No escanea el mundo completo. - No fuerza carga de chunks. - Solo escanea chunks ya cargados para minimizar lag. - Usa escaneo por lotes por tick para evitar congelar el servidor. - El loot varía según probabilidad ponderada y límites configurados.

Requisitos

- Servidor Arclight con soporte Bukkit/Spigot. - Java 21. - No requiere mod en cliente.

ADS