Barrel Shops
Dependencies:
This mod requires installation of MySQL Driver version 9.1.0.
Available Commands:
/balance [player]— displays your balance if no player is specified, otherwise shows another player's balance/balancetop [page]— displays the balance leaderboard/balancegive <player> <amount>— admin command with OP privileges, allows giving money to players/pay <player> <amount>— transfers money to another player
Configuration Setup
The configuration file is located at /config/barrelshops/config.json:
{
"db-url": "jdbc:mysql://HOST:PORT/DB_NAME",
"db-user": "USER",
"db-password": "PASSWORD",
"c1": "Starting balance for new players",
"onboarding-balance": 10,
"c2": "Passive income over time — every X minutes a player receives $Y",
"passive-income-interval-minutes": 30,
"c3": "Set to -1 to disable passive income",
"passive-income-amount": 5
}
After the first mod launch, you need to configure MySQL credentials and then restart the server.
Shop Creation (with NBT support: enchantments, etc.)
- Place a barrel
- Put inside the items you want to buy/sell, including the quantity (for example, 15 apples)
- Attach a sign to any side of the barrel
- Write in the first line: [BUY], [SELL], [ADMINBUY] or [ADMINSELL] (admin shops require OP privileges to set up or remove)
- In the last (fourth) line, enter the price, for example, 124
- Done! The sign will change color, after which you can add stock or take items out (if it's not an admin shop), and players will be able to use the shop!