RA-MinerRegen
Author: RajaAditya Website: rajaaditya.my.id Version: 1.0.0 API: Paper 1.21.x
Features
Mining Areas
- Pick a mode in
config.yml:- WORLD applies the rules to every world in
whitelist-worlds - REGION applies them only inside regions you create with a selection wand
- WORLD applies the rules to every world in
- Regions are created with a wand (left click = position 1, right click = position 2) and a name, and are stored in SQLite
Whitelist and Regeneration
- Only blocks in
whitelist-blockscan be broken in a managed area. Everything else is protected - A mined ore is replaced and then regenerates after
cooldown-seconds - Two cooldown modes:
- PER_ORE gives every mined block its own timer
- GLOBAL resets all waiting blocks together on one repeating timer
- The check interval is configurable, with a default of one second (20 ticks)
Anti-Exploit
prevent-block-placestops players from placing blocks in managed areas, which closes the "place, break, repeat" trick that would farm cooldown resets- A command blacklist (for example
home,tpa,spawn) blocks escape commands while a player is inside a managed area - Staff with
minerregen.bypass.blacklistare not affected by the blacklist
Placeholder for Scoreboards
- A countdown to the next global regeneration can be shown in a scoreboard or tab
Dependencies
| Plugin | Required | Purpose |
|---|---|---|
| PlaceholderAPI | No (softdepend) | Enables %minerregen_*% placeholders |
Installation
- Place
RA-MinerRegen.jarinto yourplugins/folder - Restart the server
- In
REGIONmode, run/minerregen wandand select two corners, then create a region with/minerregen region create <name> - Edit
config.ymlandmessages.yml, then run/minerregen reload
File Structure
text
1
plugins/RA-MinerRegen/
├── config.yml # Mode, whitelist, cooldowns, blacklist
├── messages.yml # All messages
└── (SQLite file) # Saved regions
Configuration
config.yml
yaml
1
mode: REGION # WORLD or REGION
whitelist-worlds: # used only in WORLD mode
- dungeon_world
cooldown-seconds: 60
cooldown-mode: PER_ORE # PER_ORE or GLOBAL
whitelist-blocks:
- COAL_ORE
- IRON_ORE
- GOLD_ORE
- DIAMOND_ORE
- EMERALD_ORE
- LAPIS_ORE
- REDSTONE_ORE
- DEEPSLATE_COAL_ORE
# ...and the other deepslate ores
prevent-block-place: true
regen-check-interval: 20 # ticks
blacklist-commands: # without the slash
- home
- tpa
- spawn
messages.yml (excerpt)
yaml
1
prefix: "&8[&bMinerRegen&8] &r"
block-not-whitelisted: "&cYou cannot break that block here."
place-blocked: "&cYou cannot place blocks in this area."
wand-given: "&aRegion wand given. Left click = pos1, right click = pos2."
region-created: "&aRegion &f{name} &acreated."
command-blocked: "&cThe command {command} cannot be used in this area."
Position and region messages use {x}, {y}, {z}, and {name}.
Commands
The main command is /minerregen (alias /mr).
| Command | Description | Access |
|---|---|---|
/minerregen wand | Get the region selection wand | Admin |
/minerregen region create <name> | Create a region from your two selected positions | Admin |
/minerregen region delete <name> | Delete a region | Admin |
/minerregen region list | List regions | Admin |
/minerregen reload | Reload config and messages | Admin |
Permissions
| Permission | Default | Description |
|---|---|---|
minerregen.admin | op | Use the admin commands (wand, region, reload) |
minerregen.bypass.blacklist | op | Ignore the command blacklist in managed areas |
PlaceholderAPI
Requires PlaceholderAPI. Identifier: minerregen.
| Placeholder | Description |
|---|---|
%minerregen_timereset_global% | Countdown to the next global regeneration as HH:MM:SS, or N/A when cooldown-mode is not GLOBAL |
License
Developed by RajaAditya — rajaaditya.my.id