Dependencies:
Requires you to install https://modrinth.com/mod/mysql-driver/version/9.1.0
Commands:
- /balance [player]: shows your balance if no player given, if not shows their balance
- /balancetop [page]: shows the leaderboard of balances
- /balancegive <player> <amount>: admin command, requires OP
- /pay <player> <amount>: transfers money
Config.json
/config/barrelshops/config.json
{
"db-url": "jdbc:mysql://HOST:PORT/DB_NAME",
"db-user": "USER",
"db-password": "PASSWORD",
"c1": "The balance a new player starts with",
"onboarding-balance": 10,
"c2": "Passive income over time, every X minutes a player gets $Y",
"passive-income-interval-minutes": 30,
"c3": "Set to -1 to disable passive income",
"passive-income-amount": 5
}
You need to run the mod once, and set up the MySQL credentials, then start again the server.
Shop creation (Support with NBT: Enchantments, etc)
- Place a barrel
- Put inside the item you want to buy/sell, and the amount too, for example 15 apples.
- put a sign on any side of the barrel
- put in the first line [BUY], [SELL], [ADMINBUY] or [ADMINSELL] (admin shops require OP to set up or destroy)
- put in the last line (4th) the price, for example 124
- Done! the sign should be given some color and you can now put stock onto it or take it out (if non admin) and players will be able to use it!