📦

AredoCrates

Periodic loot crate spawns at admin-defined locations, with a click-to-unlock countdown, a live armour-stand label, and Dynmap markers so the whole server can race to the drop.

Private Dynmap
About

Every few minutes the plugin spawns a chest at one of a configured pool of locations, broadcasts the coordinates, drops a Dynmap marker, and starts an unlock timer. The first player to reach the chest right-clicks to begin unlocking; once the timer ticks down, the chest opens and players can race to grab the loot.

Loot is rolled from a weighted loot table with min/max stack sizes per entry. The number of items each crate holds scales logarithmically with online player count, more players, more loot, but not linearly so a packed server doesn't trivialise the table.

Crate lifecycle

Spawn. Every TicksPerCrateSpawn ticks (default 72,000 = one hour), if no crate is currently active, the plugin picks a random location from the configured pool, places a chest, and fills it with StartingCrateItems + log2(onlinePlayers) rolls from the loot table. The chest's location and the unlocked-time countdown are broadcast.

Lock. A floating armour stand sits below the chest with a custom name showing the live countdown, e.g. Magic Crate [3m:42s]. A Dynmap marker mirrors the same label on the live map. While the timer is running, any right- or left-click on the chest is cancelled and the player gets an action-bar "Crate is locked!" message.

Unlock. The first interaction with the chest starts the timer at TicksForCrateUnlock (default 18,000 = 15 minutes). When it hits zero the label flips to [UNLOCKED] and the chest can be opened normally. Admins can fast-forward the countdown to its last tick with /ac skiptimer.

Cleanup. When a player closes the chest's inventory and it's empty, the plugin broadcasts that the crate was redeemed, removes the chest, the armour stand, and the Dynmap marker, and clears state so a future spawn tick can place a new one.

Hard Dynmap dependency: the plugin loads Dynmap's MarkerAPI on enable. Dynmap must be installed; without it the plugin disables itself. The crate icon used is Dynmap's built-in chest marker.
Loot table

Loot entries are weighted: when filling the chest, each roll picks an entry by relative weight, then chooses a stack size uniformly between that entry's min and max. Items are added by holding the desired stack and running /ac loottable add <weight> <min> <max>. The held item's NBT is preserved, so enchanted/named/custom-NBT items work as loot exactly as configured.

/ac loottable show opens a paginated 54-slot inventory listing every loot entry, each with Weight / Min / Max appended to its lore, handy for sanity-checking the table without reading data.yml.

Commands

All commands are available under /ac or /aredocrates.

General
  • /ac help
    Lists every command the player has permission to run.
  • /ac reload
    Reloads config.yml.
Loot table
  • /ac loottable add <weight> <min> <max>
    Adds the held item to the loot table with the given weight and stack-size range. Single-stack snapshot, NBT preserved.
  • /ac loottable remove
    Removes whichever loot entry matches the held item.
  • /ac loottable show [<page>]
    Opens a paginated GUI of the loot table with each entry's weight, min, and max appended to the item's lore.
Spawn locations
  • /ac location add <x> <y> <z>
    Adds a candidate spawn location in the player's current world.
  • /ac location remove <x> <y> <z>
    Removes a spawn location. If the currently-active crate is at that location, it's cleared too.
  • /ac location show
    Lists every defined spawn location.
Crate control
  • /ac spawncrate
    Force-spawns a crate immediately, bypassing the next-spawn timer. No-op if a crate is already active.
  • /ac skiptimer
    Drops the unlock countdown to its last tick, the crate unlocks one tick later.