Mines
PulsePrison has two kinds of mines:
- Rank mines: public mines you build in the world, each tied to a rank.
- Private mines: a personal mine per player, made of packets, that grows with upgrades.
Both count as mines for area enchants, placeables and robots, and pay through the same pipeline: enchants, selling, backpack, levels, pets, season and clan.
Rank mines
| Configuration | config.yml (mines section) |
| Data | mines.yml |
| Menu | menus/mines.yml (/mines) |
Creating a mine
/mine pos1 standing on one corner
/mine pos2 standing on the opposite corner
/mine create a A creates mine "a" for rank A; the spawn is your position
/mine composition a add STONE 80
/mine composition a add DIAMOND_ORE 5
/mine setdelay a 600 reset every 10 minutes (0 turns it off)
/mine setpercent a 50 reset at 50% mined (0 turns it off)When both resets are on, the first one to trigger wins.
Staff commands
| Command | Does |
|---|---|
/mine pos1 · /mine pos2 | Region corners |
/mine create <id> [rank] | Creates the mine |
/mine composition <id> list|add <block> <weight>|remove <block>|clear | Block mix |
/mine setrank <id> <rank|none> | Required rank |
/mine setspawn <id> | Moves the spawn to your position |
/mine setdelay <id> <seconds> · /mine setpercent <id> <0-100> | Resets |
/mine seticon <id> <material> · /mine rename <id> <name> | How it looks in /mines |
/mine reset <id> · /mine info <id> · /mine list · /mine delete <id> | Management |
Permission: pulseprison.mine.admin.
Players
/mines(aliases/mina,/minas) shows the mines with lock status, percentage mined and time to the next reset./mine tp <id>teleports to an unlocked mine.- Mining in a higher rank's mine is blocked with a notice. Players with prestige skip the check, because prestige sends them back to the first rank (
rank-access.prestige-unlocks-all).
Reset engine
mines:
engine: auto # auto, worldedit or batched
blocks-per-tick: 25000 # built in engine only
broadcast-resets: true
default-reset-delay-seconds: 600
default-reset-percentage: 0
rank-access:
enabled: true
prestige-unlocks-all: true- With FastAsyncWorldEdit or WorldEdit,
autodelegates the reset to them. - Without them, the built in engine spreads the work over several ticks without physics.
- Players inside the mine are moved to the spawn before it refills.
Private mines
| Configuration | pmines/config.yml, pmines/types/*.yml |
| Structures | pmines/structures/*.ppmine |
| Menus | pmines/menus/ (main, members, public, admin, admin-types) |
| Data | data/pmines/ |
| Module | private-mines |
How they work
- The mine world (
pulseprison_pmines) is empty on the server. Each player receives the mine blocks as packets, so resets, expansions and upgrades never write the world and thousands of blocks per second cost no world updates. - Each mine stores a seed and one bit per mined block. A 61×61×60 mine takes about 28 KB.
- Breaks are validated on the server: access, pickaxe, vanilla break time, reach and breaks per second.
- PacketEvents is included. No WorldEdit or WorldGuard needed.
- Nobody is kicked for "flying" while standing on packet blocks in the mine world. Actually flying requires
pulseprison.pmine.flyor having flight before entering.
Types, stages and expansion
A type is a structure (the island, walls, spawn) with a mineable box. It is created in-game with /pmineadmin setup: see Creating a private mine type.
Each type has a file in pmines/types/:
name: '&bDefault'
structure: default
spawn: {x: 0.5, y: 100.0, z: 0.5, yaw: 0.0, pitch: 0.0}
min-corner: {x: -5, y: 40, z: -5} # mineable box
max-corner: {x: 5, y: 89, z: 5}
max-expansion: 34 # blocks it can grow per side
expansion-cost:
currency: money
base: 25000
growth: 1.15 # each expansion costs base × growth^n
block-types: # block stages
'1':
cost: {}
blocks:
STONE: 70
COBBLESTONE: 30
'2':
cost:
money: 500000
tokens: 5000
requirement:
rank: C
prestige: 0
pickaxe-level: 25
blocks:
COBBLESTONE: 50
ANDESITE: 30
DIAMOND_ORE: 1- Expansion: the mineable box grows one block per side per purchase, up to
max-expansion. - Stages: each stage changes the block mix. They are bought with
costand needrequirement(rank, prestige, pickaxe level). - Next type: with
upgrade-next-mine, after the last stage the mine moves to the next type inmine-order.
Main pmines/config.yml options
| Option | Does |
|---|---|
default-mine · mine-order · upgrade-next-mine | Starting type and type order |
percent-mined-to-reset · reset-percentage-options | Automatic reset and menu options |
mine-gaps.chunks | Empty chunks between mines |
max-members | Members per mine |
tax-currency · tax-max-rate | Visitor tax |
invites.require-accept · invites.expire-seconds | Invitations |
player-purchases.enabled | Buying expansions and stages from the menu |
join.teleport-to-spawn | Teleport to spawn on join |
tools-in-mine-world.enabled | Give the pickaxe only inside the mine world |
commands.base-command | What plain /pmine does: gui, teleport or context |
commands.reset | Manual reset cooldown by permission |
setup.* | Setup limits and spawn height |
performance.* | Cache, saving and threads |
anticheat.* | Reach, break time, breaks per second and punishments |
Every option is commented in the file.
Mine plots have a fixed size from the moment the first mine is created: the widest type plus
mine-gaps. If you later add a wider type, it is disabled while mines exist. Choose your structure sizes before opening.
Player commands
/pmine (aliases /privatemine, /pm, /minaprivada):
| Command | Does |
|---|---|
/pmine | Mine menu, or teleport depending on commands.base-command |
/pmine create | Claims your mine |
/pmine go [player] | Goes to your mine or another player's |
/pmine invite|uninvite <player> | Members. With require-accept, they answer with /pmine accept|deny <owner> |
/pmine ban|unban <player> | Bans; kicks the player out if inside |
/pmine members · /pmine public | Members menu and open mine browser |
/pmine open · /pmine lock | Opens or closes the mine to visitors |
/pmine tax <percent> | Tax on what visitors earn while you are online |
/pmine reset · /pmine resetpercent | Manual reset and automatic threshold |
/pmine expand · /pmine upgrade · /pmine info | Growth and details |
Permissions: pulseprison.pmine (everyone), pulseprison.pmine.<subcommand> if commands.permissions is on, pulseprison.pmine.reset.vip and pulseprison.pmine.reset.staff for faster resets.
Staff commands
/pmineadmin (aliases /adminmine, /amine, /apm), permission pulseprison.pmine.admin:
| Command | Does |
|---|---|
menu | Admin menu |
go <player> · info <player> · reset <player> | Management |
expand|shrink <player> [amount|max|min] | Expansion |
upgrade|deupgrade <player> [amount|max] · setupgrade <player> <stage> | Stages |
settype <player> <type> | Changes the type |
setresetpercent <player> <percent|-1> | Reset threshold |
delete <player> confirm | Deletes the mine |
setup ... | Creates types, see the guide |
reload · stats | Reload and performance stats |
Placeholders
%pulseprison_pmine_<key>% for the player's mine and %pulseprison_pmine_here_<key>% for the mine they stand in. See Placeholders.
Events for addons
PrivateMineCreateEvent, PrivateMineResetEvent, PrivateMineResetCompleteEvent, PrivateMineUpgradeEvent, PrivateMineAccessEvent, PrivateMineVisitEvent, PrivateMineTaxEvent and PrivateMineBlocksMinedEvent. See Events.