Every couple of hours the server cancels the daily routine. A pit opens up somewhere in the world, an announcement with coordinates hits chat, and the whole online crowd rushes to dig right now, not "someday". Fifteen minutes later the mine is gone as if it never existed, and fifty players have new currency in their pockets and the urge to go "one more time". This isn't a metaphor, it's a ready-made mechanism: CloudDeadlyMine is the "Deadly Mine" event (Смертельная шахта), a take on the cult HolyWorld mechanic, for Paper 1.19.4, by the Cloud Delight studio.
CloudDeadlyMine isn't a one-off script, it's a self-contained loop. The plugin decides when to open the mine, builds it, counts pickaxe hits and hands out rewards, repairs mined-out ore during the event, and cleans everything up after it closes. Once configured, it needs no manual commands. The player is left with a simple, satisfying job: run and dig before it closes. For the server, it's a ready-made reason to gather your online at one point on a regular basis, a clear "ore → money" mechanic that needs no explanation in chat, and a controlled injection of currency into the economy. You keep both reward tables in your own hands through the config.
The event runs on a built-in timer defined by two config values: event.interval-minutes is the pause between mines (120 minutes by default) and event.duration-minutes is how long the mine stays open (15 by default). One important detail: the pause counts from the previous mine's closing, not its opening. The next cycle is scheduled inside cleanup(), when everything is already tidied up. The same applies at server start: onEnable doesn't open a mine right away. It sets a timer for the full interval plus the announcement phase (up to 15 extra minutes by default, based on the maximum value in before-minutes). So the first mine after a restart appears noticeably later than the bare interval-minutes.
The location on the map is chosen when the announcement phase starts, not in advance. With spawn.use-fixed: true the mine lands on the same spot every time (center-x/center-z). With false (the default) the coordinates are random within spawn.radius (500 blocks by default) of that same base point center-x/center-z (0,0 by default, roughly the center of the map). Nobody sets the height manually: the plugin takes the highest block in the chosen column (getHighestBlockYAt), so the mine always starts at the surface and goes down structure.height blocks. If the config asks for a deeper dig than the world allows, the bottom stops at the world floor.
Only one mine can be active at a time. That's architecture, not a setting: the engine has three states (waiting / announcing / active), and any start attempt, automatic or by command, does nothing unless the plugin is in the waiting state.
The announce.before-minutes list (default 15, 10, 5, 1) sets not only the notification moments but the entire length of the announcement phase. The plugin takes the maximum of the list as the starting point and counts from it how many ticks until each message goes out and when to finally spawn the mine. Set [30, 20, 10, 1] and the whole announcement phase stretches to 30 minutes. Leave a single number and you get a single warning. The announcement text (announce.message) supports the placeholders %minutes% and %x% %y% %z%, and opening and closing have their own templates (spawn-message, close-message).
A manual start works very differently: /deadlymine start skips the announcement phase completely and spawns the mine instantly, with no chat message at all. If you need to gather players beforehand for an unscheduled event, write the announcement yourself, because the plugin won't send one. A manual start cancels the pending auto-start on the timer but doesn't break the cycle for good. As soon as that mine closes, on its own or via /deadlymine stop, cleanup() schedules the next auto-start after the full interval as usual.
The mine isn't a maze of tunnels, it's one big shaft. The generation rule is simple: a block becomes "shell" (wall, floor, ceiling) if it sits on the boundary of the rectangular box along at least one axis, and everything inside the bounds is air. That gives a shape that's easy to miss just walking around inside: the floor (bottom layer) and ceiling (top layer) are solid slabs across the full cross-section, while the side walls are thin, one block thick, and only along the perimeter of each intermediate level. The shell material depends on height: the lower half of the mine uses structure.wall-material-deep (deepslate by default), the upper half including the ceiling uses structure.wall-material (stone), and the bottom floor layer has its own material, structure.floor-material (cobblestone).
Ore is embedded in the shell at a single density, ore-density (0.18 by default), and that share is calculated from the shell blocks, not from the whole mine volume (the interior is empty anyway). At the default size of 11×11×20 the shell is about 960 blocks (the solid floor and ceiling account for around 240, the thin perimeter walls on 18 intermediate levels for roughly another 720). At 18% density that's about 170 ore blocks per mine on average per spawn, scattered across the floor, ceiling, and walls rather than gathered in veins. Each ore block's material is picked at random from the ore-materials list.
The entrance is the only 3×3 hole in the ceiling, right above the spawn point. During construction the plugin carves it out to air and removes ore from there permanently, so it never comes back even on regeneration. It's also the only exit. Placing blocks and emptying buckets inside the claim is not allowed (see below), so you can't build yourself a staircase down either, only jump the full height of the mine. The plugin does nothing to cancel fall damage, so keep this in mind when you raise structure.height: the deeper the mine, the harder the landing at the entrance.
Every refresh-seconds seconds (minimum 5, 60 by default) the plugin goes through the list of original ore positions, and wherever there is air now (the block was mined), it places a random ore from the list again. Regeneration touches only those specific points. It neither restores nor damages walls or floor, and the entrance, where ore was removed permanently at build time, is never overgrown by regeneration.
The mine's claim has nothing to do with WorldGuard. The plugin doesn't use it as a soft or hard dependency, and there isn't a single call to its API in the code. All protection is an internal RegionManager that stores six numbers (the cube's X/Y/Z bounds) and a world name, plus one check: "is this point inside the cube". It's called on block break, block place, bucket emptying, and on the block lists in EntityExplodeEvent/BlockExplodeEvent. The protected zone is the structure plus a region.padding margin (3 blocks by default) on all six sides, top and bottom included, so tunneling in from above or below is also intercepted.
Everything inside this zone is forbidden except one action: breaking ore. A block from the ore-materials list inside the structure is the only exception. Instead of cancelling the event, the plugin suppresses the vanilla drop and XP and pays out currency instead of an item. Everything else (walls, floor, ceiling, blocks in the padding zone) can't be broken at all. Placing blocks and emptying buckets inside is forbidden too. Explosions (creeper, TNT, any source that fires EntityExplodeEvent or BlockExplodeEvent) don't damage the structure: the plugin simply removes all blocks inside the zone from the "about to be destroyed" list, and doesn't touch the explosion itself or the damage to players. The deadlymine.bypass permission turns off all these checks at once.
A reward comes for every individual ore block mined, not per vein and not on a cooldown, strictly when a block breaks. Both reward tables in the config use weights, not percentages: the plugin sums all the weights in a section and draws a random number in that range, so each amount's real chance is its weight divided by the sum of weights. With the default values the weights add up to exactly 100, so the numbers below read as percentages. But add a new line or change one weight and the proportions recalculate on their own.
The bulk of the loot is regular currency (default symbol $):
With the currency.donate-chance chance (0.02 = 2%), a hit pays out donation currency instead of regular currency (default symbol ★). It has its own separate weight table, and it drops instead of regular currency, not together with it:
The presentation differs by the weight of the moment: a regular reward is a quiet plus in the actionbar and the ENTITY_EXPERIENCE_ORB_PICKUP sound by default. A donation reward is a full-screen title (template effects.donate-title, a flash of about two seconds: no fade-in delay, one and a half seconds on screen, half a second to fade out) and a separate sound, ENTITY_PLAYER_LEVELUP by default. Every ore hit also spawns particles (VILLAGER_HAPPY, eight of them with a small spread) if effects.particles is on, plus a shared bossbar counting down to the mine's closing, one for everyone currently online.
The plugin has no leaderboard or personal stats ("who dug how much"). It has no database and doesn't track the number of hits or the earnings for a given mine. The currency bridge even has a method for reading a player's balance, but the current event cycle never calls it. Payouts go one way only, with no read-back and no history recording. If you want a top-miners list, that's a separate task on top of the current code, not a config option you can switch on.
All four external plugins are declared as soft dependencies in plugin.yml. If any of them is missing, only its part of the functionality is disabled and a warning is written to the log. The plugin as a whole doesn't crash.
/deadlymine reload without a full restart, the hologram still won't appear. Only a server restart helps.schematic.file/schematic.paste-air config keys do nothing. The groundwork for ready-made schematics exists in the code and works as a standalone piece, but it isn't connected to the event's working cycle.event.auto-enabled: true, and the plugin announces and opens the mine every 120 minutes by itself, keeps it open for 15 minutes, and cleans up on its own. An admin is only needed to edit the config./deadlymine start (or with coordinates right away: /deadlymine start 250 -800) raises the mine immediately, bypassing the queue and announcements. If you need to gather players beforehand, write the announcement yourself, because there won't be an automatic message.spawn.use-fixed: true plus set center-x/center-z keep the mine in the same place every time. That's handy if there's a prepared area or decorations around it that aren't tied to the plugin./deadlymine reload. You don't need to restart the server, except for one case: enabling DecentHolograms after the fact (see above)./deadlymine stop is an instant cleanup: the structure is restored from the snapshot block by block, the region is removed, and the next auto-start is scheduled as usual, as if the mine had closed on the timer.All subcommands sit under one entry point with two short aliases, /dm and /шахта (the Cyrillic one works too):
| Command | Action |
|---|---|
/deadlymine start | Instant start; the plugin picks the coordinates. |
/deadlymine start 250 -800 | Instant start with a set X/Z center. The plugin still determines the height (Y) itself from the terrain. |
/deadlymine stop | Close the current mine early and put the landscape back. |
/deadlymine reload | Reload config.yml and the reward tables without restarting the server. |
/deadlymine info | Status: active and time left (mm:ss), announcing, or waiting for the next cycle. |
/dm, /шахта | Short aliases for the main command; they accept the same subcommands. |
With no arguments or an unknown word, the command just prints a list of hints. Without the deadlymine.admin permission, any attempt ends with a denial message.
deadlymine.admin — access to all management subcommands (operators by default).deadlymine.bypass — ignore the mine's claim entirely: break the structure, place blocks, use buckets inside the zone even while the event is active (operators by default too).The config is a single file split into logical blocks. Almost any of them is applied without a server restart via /deadlymine reload (except the DecentHolograms case noted above):
| Block | Keys | What it controls |
|---|---|---|
| license | enabled, key, url, grace-hours | Protection from unauthorized copies: an online key check when the plugin starts. If the check server is unreachable, it runs from the local cache within grace-hours, otherwise the plugin disables itself. For your own server, set enabled: false. |
| event | auto-enabled, interval-minutes, duration-minutes | The whole auto-start, the pause between cycles (counted from closing), and the length of the active phase. |
| announce | before-minutes, message, spawn-message, close-message | The timing and texts of warnings, opening, and closing; the before-minutes list sets the whole length of the announcement phase. |
| spawn | world, use-fixed, center-x, center-z, radius | The world and how the spot is chosen: fixed, or random within a radius of the base center. The height is always determined automatically from the terrain. |
| structure | width, depth, height, wall-material, wall-material-deep, floor-material | The box size and the shell materials: upper half, lower half, and the floor separately. |
| ore-materials / ore-density | block list, ore-density | Which blocks count as ore and what share of the shell is seeded with them during construction. |
| refresh-seconds | — | The regeneration period for mined-out ore at the original positions. |
| region | padding | The padding of the protected zone around the structure on all six sides. |
| schematic | file, paste-air | Groundwork for pasting a .schem through WorldEdit; not connected to the event cycle today, generation is always procedural. |
| currency | vault-symbol, points-symbol, donate-chance, donate-amounts, normal-amounts | Currency symbols, the donation chance, and both weight tables for rewards. |
| effects | bossbar, bossbar-title, hologram, hologram-lines, particles, sound-normal, sound-donate, donate-title | All presentation: the timer bar, hologram text, particles, and sounds, separately for regular and donation drops. |
A mine that opens itself, protects itself without any third-party protection plugin, and cleans up after itself. All that's left for the server is players with pickaxes and a timer that has started counting down again.