7.2 KiB
CoalGov
CoalGov is a server-side Paper/Bukkit plugin for vanilla Minecraft clients. It adds a small coal-backed economy, land classes, claims, mining permits, protected government land, and coal ore mining restrictions.
The ledger uses Coal Cents for sub-coal transactions: 100cc equals 1 coal. Commands that accept money still treat plain numbers as coal, so 2.5, 2.50, and 250cc all mean 2 coal 50cc.
Build
./gradlew build
The jar is written to build/libs/CoalGov-*.jar.
VPS Install
- Build with
./gradlew build. - Copy
build/libs/CoalGov-*.jarto/path/to/server/plugins/. - Restart the Paper server.
- Edit
plugins/CoalGov/config.yml. - Run
/coalgov admin reload.
This is a Paper/Bukkit plugin only. It does not require Forge, Fabric, resource packs, client mods, or custom launchers.
Commands
/coal balance/coal deposit/coal withdraw <amount>; withdrawals must be whole coal because they create coal items/coal pay <player> <amount>; accepts coal decimals orcc/coal fines [list|pay <id|all>]/market/claim wand/claim buy <homestead|industrial> <radius>/claim buy <homestead|industrial>after selecting a polygon with/claim wand/claim info/claim list/claim show <id>/claim appraise [id]/claim sell [id]/claim transfer <id> <player>/claim abandon <id>/permit buy mining <regionName>/permit list/diviningrod/land info/land create <name> <landClass> <radius>/land delete <name>/land list/coalgov admin balance <player>/coalgov admin grant <player> <amount>/coalgov admin take <player> <amount>/coalgov admin reload/coalgov admin bypass <on|off|status>/coalgov admin rod/coalgov admin treasury <balance|grant <player> <amount>>/coalgov admin tax exempt <player> <on|off|status>/police fine <player> <amount> <reason>/cgnpc zone create <name>/cgnpc create <trader|worker> <name> <zone>/cgnpc stock <id> <material> <amount>/cgnpc funds <id> <amount>/cgnpc haggle <id> <buy|sell> <material> <amount> <offer>
Super Furnace
Craft a CoalGov Super Furnace with a furnace in the center and stone in the eight surrounding slots. Placed super furnaces are persisted in SQLite, smelt 5x as fast, and burn fuel 4x faster.
Permissions
coalgov.admin: admin commands, defaultop. Gameplay bypass is available with/coalgov admin bypass on.coalgov.coal: coal economy commands, defaulttruecoalgov.claim: claim commands, defaulttruecoalgov.permit: permit commands, defaulttruecoalgov.land.info: land info commands, defaulttruecoalgov.market: market trading, defaulttruecoalgov.diviningrod: divining rod command, defaulttruecoalgov.police: police fine commands, defaultop
Claim Wand
Run /claim wand to receive a CoalGov claim wand. Right-click blocks to add polygon points. Once at least three points are selected, /claim buy homestead or /claim buy industrial buys the polygon instead of a radius claim. Sneak right-click with the wand to clear the current polygon. The plugin shows temporary particles between points and client-side gold marker block previews while selecting, and permanent protected marker blocks are placed at claim vertices after purchase.
Market
/market opens a vanilla inventory menu. Players can sell configured resources to the Ministry or buy from Ministry stock. A normal click buys 1 item, and shift-click buys 64. Prices are dynamic: each material has a base price, but the live price rises when market stock is low and falls when stock is high. Buying and selling use Coal Cents internally, so cheap blocks like cobblestone can transact below 1 coal without forcing bulk purchases. Selling resources increases stock; buying resources decreases stock. Bulk sales are priced against simulated rising stock so one large sale cannot receive the first scarce-stock quote for every item. Coal-equivalent materials keep a floor based on direct coal value, charcoal conversion, or fuel value; arbitrary/generated resources like cobblestone have no forced 1-coal floor. The stock is persisted in SQLite.
Example Config
economy:
starting_balance: 0
deposit_coal: true
deposit_coal_blocks: true
claims:
homestead:
base_cost: 32
cost_per_block: 0.05
max_radius: 45
first_claim:
free: true
max_radius: 12
industrial:
base_cost: 128
cost_per_block: 0.15
max_radius: 96
permits:
mining:
cost: 64
duration_hours: 72
market:
dynamic:
initial_stock: 1024
target_stock: 1024
min_multiplier: 0.35
max_multiplier: 3.0
sell_multiplier: 0.85
buy_multiplier: 1.15
prices:
DIRT: 0.01
COBBLESTONE: 0.02
SAND: 0.05
GRAVEL: 0.04
OAK_LOG: 0.25
SPRUCE_LOG: 0.25
BIRCH_LOG: 0.25
TORCH: 0.10
COAL: 1.0
COAL_BLOCK: 9.0
RAW_COPPER: 0.5
COPPER_INGOT: 1.0
RAW_IRON: 1.0
IRON_INGOT: 2.0
RAW_GOLD: 2.0
GOLD_INGOT: 4.0
DIAMOND: 32.0
EMERALD: 12.0
land:
default_land_class: FREEHOLD
deny_mining_in_government: true
deny_mining_in_protected_preserve: true
deny_mining_in_border_zone: true
spawn:
protection_radius: 32
guide:
create_government_region: true
lines:
- "COALGOV BASIN"
- "Free first"
- "homestead:"
- "/claim buy"
- "Use /claim wand"
- "for polygons"
- "Coal seams:"
- "redwood ridges"
- "Permits:"
- "/permit buy"
- "mining <region>"
- "/market trades"
messages:
prefix: "&8[&6CoalGov&8]&r "
Manual Test Checklist
- Server starts without errors.
- Database file is created at
plugins/CoalGov/coalgov.db. - Player joining creates a
playersrow. /coal balanceworks./coal depositremoves coal from inventory and increases balance by100ccper coal item./coal withdrawdecreases balance and gives coal items for whole-coal amounts./coal paytransfers whole coal, decimal coal, andccamounts./marketopens a vanilla inventory trading menu.- Selling resources through
/marketincreases market stock. - Buying resources through
/marketdecreases market stock and changes future prices. /land createcreates a region./land inforeports current land class./claim buycreates a claim and charges coal./claim appraiseappraises the claim you are standing in./claim sellsells the claim you are standing in back to the government at appraised value./claim show <id>displays a temporary particle outline./claim wanddraws a temporary polygon with particles and marker block previews./claim buy homesteadafter wand selection creates a polygon claim.- Claim corners are marked with protected gold blocks.
- Unclaimed land is protected from normal block placement and breaking.
- Overlapping claims are rejected.
- Mining coal in
PROTECTED_PRESERVEis denied. - Mining coal in
MINING_CONCESSIONwithout permit is denied. - Buying a mining permit allows mining coal in that concession.
- Admin permission alone does not bypass gameplay restrictions.
/coalgov admin bypass onbypasses build, mining, and marker restrictions for that admin session.