Sueta

DungeonRefresher

1.0.1

Automatically regenerates loot in chests, barrels and vaults with custom cooldown and vanilla loot table support.

·Plugin

DungeonRefresher

Automatically regenerates loot in chests, barrels, and trial vaults after a configurable cooldown.

Perfect for custom dungeons, adventure maps, and multiplayer servers where loot needs to be renewable.

⚙️ Core Mechanics

  • First open – a random cooldown (between min and max minutes) is stored.
  • Cooldown expired – the container's loot is completely regenerated on the next open.
  • Custom loot tables – assign any vanilla loot table (e.g. minecraft:chests/simple_dungeon) using /dr setloot.
  • Persistent data – cooldowns and custom loot assignments survive server restarts using PersistentDataContainer.

✨ Features

  • Configure min/max cooldown in minutes (default 24–96 hours).
  • Choose which container types are affected (chests, barrels, trial vaults).
  • Clear inventory before refilling (configurable).
  • Storage options: PDC (persistent) or in-memory Caffeine cache.
  • Protection system – prevent breaking containers while on cooldown (with bypass permission).
  • Tab completion for subcommands and all vanilla chest/dispenser loot tables.

📋 Commands & Permissions

CommandPermission
/dr reloaddungeonrefresher.reload
/dr debugdungeonrefresher.debug
/dr resetdungeonrefresher.reset
/dr setloot <key>dungeonrefresher.setloot
/dr resetlootdungeonrefresher.resetloot

Alias: /dungeonrefresher. All permissions default to op.

🔧 Configuration

Detailed config.yml with comments:

# Refresh timing settings (in minutes)
refresh:
  # Minimum cooldown before loot can be regenerated (in minutes)
  # Default: 1440 minutes = 24 hours
  min-minutes: 1440
  # Maximum cooldown before loot can be regenerated (in minutes)
  # Default: 5760 minutes = 96 hours
  max-minutes: 5760

# Which container types to process
features:
  # Trial Vaults (requires Paper 1.21+)
  vaults: true
  # Normal chests and trapped chests
  chests: true
  # Barrels
  barrels: true
  # Clear inventory before filling with new loot (if false, new loot will be merged with existing items)
  clear-inventory-on-refresh: true

# Cooldown storage method
storage:
  # true = use PersistentDataContainer (stored inside the block, survives server restarts)
  # false = use in-memory Caffeine cache (resets on restart, faster but volatile)
  use-persistent-data-container: true

# Protection settings (prevent breaking containers before cooldown expires)
protection:
  # Enable protection for loot containers (players cannot break them while on cooldown)
  enabled: false
  # Permission to bypass protection
  bypass-permission: "dungeonrefresher.bypass"
  # Prevent explosions from destroying containers
  protect-from-explosions: true

📦 Installation

  1. Place DungeonRefresher.jar into your plugins/ folder.
  2. Restart the server or load the plugin.
  3. (Optional) Edit config.yml if needed and run /dr reload.

Similar projects

Plugin →