# SimpleMoney A simple, server-side economy mod for Fabric. Everything runs on the server, so players do not need to install anything.
## Features
### Currency
- Every player has a balance, new players get a configurable starting amount
- Default name is Coins, but you can rename it at any time (/shopadmin currency Gold)
- /balance (or /coins) shows your own balance
- /baltop shows the 10 richest players
- /pay <player> <amount> sends money to other players
### Server shop (GUI)
- Open it with /shop
- Items are sorted into categories with multiple pages
- Left click buys, right click sells, shift-click buys a full stack or sells everything
- Every item has its own buy and sell price, and you can make items buy-only or sell-only
- Ships with a default shop, and ops can change everything in-game
- Only plain items can be sold (no enchanted, renamed or damaged items)
### Player shops (chest shops)
- Create a shop with /pshop create <buy> <sell> <amount> and right-click a chest or barrel
- The owner opens the chest normally to restock it, other players get a trading GUI
- Customers can buy from and sell to the shop, money goes to the owner even if they are offline
- Protected against hoppers below the chest, double chests, explosions and strangers breaking it
- Hoppers above the chest still work, so you can connect a farm
- Optional trade tax (percentage) to keep the economy balanced
### Admin tools - Manage categories and items with the item in your hand - Give, take, set or check money, also for offline players - List and remove player shops - Reload all files without restarting
### API for other mods
- Other mods can read balances, deposit, withdraw and transfer money
- Permission system per mod: unknown mods can only read, everything else must be enabled by an admin
- Limit per transaction, server-thread check, overflow and negative balance protection
- Audit log (transactions.log) and events (BEFORE_CHANGE, AFTER_CHANGE) for observing or blocking transactions
## Commands
| Command | Permission | Description |
|---|---|---|
| /balance, /coins | everyone | Show your balance |
| /baltop | everyone | Top 10 richest players |
| /shop | everyone | Open the server shop |
| /pay <player> <amount> | everyone | Send money |
| /pshop create <buy> <sell> <amount> | everyone | Create a player shop |
| /pshop remove, cancel, list | everyone | Manage your own shops |
| /shopadmin currency <name> | op | Rename the currency |
| /shopadmin startbalance <amount> | op | Starting money for new players |
| /shopadmin money give/take/set/check <player> [amount] | op | Manage balances |
| /shopadmin category add/remove/rename ... | op | Manage shop categories |
| /shopadmin item set/buyonly/sellonly/remove ... | op | Manage shop items |
| /shopadmin pshop list/remove/tax | op | Manage player shops |
| /shopadmin api ... | op | Permissions for other mods |
| /shopadmin reload | op | Reload all config files |
## Configuration
All files are in config/simplemoney/:
config.json, shop.json, balances.json, playershops.json, api.json and the transactions.log.
## Installation
1. Install Fabric Loader and Fabric API
2. Put the mod into your mods folder
3. Done. Only the server needs the mod
## For developers
Use the package de.jamie32132.simplemoney.api:
MoneyAccess money = SimpleMoneyApi.forMod("your-mod-id");
TransactionResult result = money.withdraw(playerUuid, 50, "Bought a wand");
Call it from the server thread only. An admin has to grant your mod the needed rights with /shopadmin api set <mod> <right> true.
## Notes - Requires Java 25 and Fabric API - Your mod can't protect against intentionally malicious mods, only install mods you trust - Found a bug? Please report it on the issue tracker