JPEconomy
Economy plugin with Vault support for Paper servers.
Downloads open soon.
Features
- Balance,
/pay,/baltopand incoming-payment toggle - Extra currencies (for example gems or tokens), each with its own commands and top list
- Banknotes (
/withdraw) - Transaction history for admins
- Vault provider, so every Vault plugin can use it
- Sync between servers over MySQL or Redis
- Balance change event for other plugins
- Money requests:
/payrequestsends a clickable pay button
Requirements
- Paper 26.1 or newer (Java 25)
- Optional:
- Vault: lets other plugins use this plugin's money
- PlaceholderAPI: placeholders in texts, and this plugin's own placeholders
Installation
- Put
JPEconomy-<version>.jarin your server'spluginsfolder. - Restart the server.
plugins/JPEconomy/is created with the config and messages. - Change what you want in the files, then reload or restart.
Type /jp as an operator to see every JP plugin you have installed, its version and which optional plugins it found.
Commands
| Command | Description | Permission |
|---|---|---|
/balance [player]Aliases: /bal, /money | Show your balance or another player's. | jpeconomy.balance |
/pay <player> <amount> | Send money to another player. | jpeconomy.pay |
/payrequest <player> <amount>Aliases: /requestmoney, /payreq | Ask another player for money. | jpeconomy.payrequest |
/paytoggleAliases: /togglepay | Turn incoming payments on or off. | jpeconomy.paytoggle |
/baltop [page]Aliases: /balancetop, /moneytop, /topmoney | The richest players. | jpeconomy.baltop |
/withdraw <amount>Aliases: /banknote | Turn money into a banknote item. | jpeconomy.withdraw |
/eco <give|take|set|reset|history|reload>Aliases: /economy, /jpeconomy | Economy admin commands. | jpeconomy.admin |
Permissions
| Permission | Default | Description |
|---|---|---|
jpeconomy.balance | everyone | See your own balance. |
jpeconomy.balance.others | everyone | See other players' balances. |
jpeconomy.pay | everyone | Pay other players. |
jpeconomy.payrequest | everyone | Ask other players for money. |
jpeconomy.paytoggle | everyone | Turn incoming payments on or off. |
jpeconomy.baltop | everyone | See the richest players. |
jpeconomy.withdraw | everyone | Create banknotes with /withdraw. |
jpeconomy.banknote.redeem | everyone | Cash in banknotes by right-clicking them. |
jpeconomy.bypass.cooldown | operators | Skip the /pay cooldown. |
jpeconomy.bypass.paytoggle | operators | Pay players who turned payments off. |
jpeconomy.admin | operators | /eco give, take, set, reset, history and reload. |
Placeholders
Needs PlaceholderAPI.
| Placeholder | Shows |
|---|---|
%jpeconomy_balance% | balance as a plain number, e.g. 1234.5 |
%jpeconomy_balance_formatted% | balance with the currency sign, e.g. $1,234.50 |
%jpeconomy_balance_short% | short balance, e.g. $1.23K |
%jpeconomy_balance_commas% | balance with thousands separators |
%jpeconomy_rank% | position in /baltop (0 = not listed) |
%jpeconomy_accepts_payments% | true / false |
%jpeconomy_top_name_<n>% | name at place n |
%jpeconomy_top_balance_<n>% | formatted balance at place n |
%jpeconomy_<currency>% | balance in an extra currency, e.g. %jpeconomy_gems% |
%jpeconomy_<currency>_formatted% | the same with the currency's sign |
%jpeconomy_<currency>_short% | short form, e.g. 1.2K |
%jpeconomy_<currency>_commas% | with thousands separators |
%jpeconomy_<currency>_rank% | position in that currency's top list |
%jpeconomy_<currency>_top_name_<n>% | name at place n for that currency |
%jpeconomy_<currency>_top_balance_<n>% | balance at place n for that currency |
For developers
Add softdepend: [JPEconomy] to your plugin.yml. For money itself, use Vault as usual.
| Event | When |
|---|---|
com.jp.economy.api.BalanceChangeEvent | A balance changed. getCurrency() is money for the main balance or a currency id; getOldBalance(), getNewBalance(), getChange() and getType() (PAY, ADMIN_GIVE, PLUGIN_DEPOSIT...). Always on the main thread. |
Configuration
All files are in plugins/JPEconomy/. Files: config.yml, messages.yml.
When you update the plugin, new options are added to your config.yml by themselves, with their comments. Your own settings stay as they are, and the old file is kept as config.old-v<number>.yml.
Languages: English, Spanish, Portuguese, French and German. Set language: in config.yml (en, es, pt, fr or de).
Default config.yml
# Used to add new options to this file after an update. Don't change it.
config-version: 2
# ╔══════════════════════════════════════════════════════════════════╗
# ║ JPEconomy · config.yml ║
# ╚══════════════════════════════════════════════════════════════════╝
# The server's money. Every Vault plugin (JPShop, JPJobs, JPAuction, JPTeleport,
# JPQuests...) uses these balances automatically when Vault is installed.
# Texts live in messages.yml. Apply changes with /eco reload
# (storage changes need a restart).
#
# Commands: /balance, /pay, /paytoggle, /baltop, /withdraw (banknotes), /eco (admin)
# Amounts can be typed as 1500, 1,500.50, 1.5k, 2m, 1b.
# Language of the messages: en (messages.yml), es, pt, fr or de (lang/<code>.yml).
# Your own language: copy a file in the lang folder to lang/<code>.yml, translate it
# and set its code here (for example it for lang/it.yml).
language: en
# Replace messages.yml with the new design when the plugin is updated.
# Your old file is kept as messages.old-vX.yml. false = never touch it.
auto-update-style: true
storage:
# SQLITE = a local file (no setup). MYSQL = a database server, needed to share
# balances between several servers.
type: SQLITE
# Prefix for the table names, handy when several plugins share one database.
table-prefix: jpeconomy_
# Only used when type is MYSQL.
mysql:
host: localhost
port: 3306
database: jpeconomy
username: root
password: change-me
parameters: useSSL=false&characterEncoding=utf8&serverTimezone=UTC
# Database connection pool. The defaults are fine for almost every server.
pool:
maximum-pool-size: 10
minimum-idle: 2
maximum-lifetime-ms: 1800000
connection-timeout-ms: 10000
currency:
# Used by {name} in the format below and by other plugins through Vault.
name-singular: Dollar
name-plural: Dollars
symbol: '$'
# How amounts are shown. {symbol} {amount} {name}
# Examples: '{symbol}{amount}' -> $1,250.00 '{amount} {name}' -> 1,250.00 Dollars
format: '{symbol}{amount}'
# Digits after the decimal point (0-4). 0 = whole numbers only.
decimal-places: 2
# true = show big amounts short everywhere: $1.25K, $3.4M.
short-format: false
# Money every new player starts with.
starting-balance: 100
# Nobody can hold more than this.
max-balance: 1000000000000
# Extra currencies next to the money above (which Vault plugins use). Each one has its
# own command: /gems, /gems <player>, /gems pay <player> <amount>, /gems top and, for
# admins, /gems give|take|set <player|*> <amount>. /eco, /pay and /baltop also take the
# currency at the end: /eco give Steve 10 gems, /pay Steve 5 gems, /baltop gems.
# Other plugins give them with a command, for example a JPCrates reward
# "eco give {player} 25 gems". Remove a currency or set enabled: false to hide it
# (balances stay saved). Ids can be letters, numbers, - and _.
# format: {symbol} {amount} {name} decimal-places: 0 = whole numbers only
# payable: players can send it to each other baltop: has a top list
# show-in-balance: shown under the money in /balance
currencies:
gems:
enabled: true
name-singular: Gem
name-plural: Gems
symbol: '◆'
format: 'FACFE{symbol} &f{amount} {name}'
decimal-places: 0
short-format: false
starting-balance: 0
max-balance: 1000000000
payable: true
pay-min-amount: 1
baltop: true
show-in-balance: true
commands: [gems, gem]
tokens:
enabled: false
name-singular: Token
name-plural: Tokens
symbol: '⛃'
format: '&#FFD27F{symbol} &f{amount} {name}'
decimal-places: 0
starting-balance: 0
max-balance: 1000000000
payable: false
baltop: true
show-in-balance: true
commands: [tokens]
pay:
# false = /pay is turned off.
enabled: true
# Smallest amount that can be sent.
min-amount: 0.01
# Allow paying players who are offline.
allow-offline: true
# Payments of this amount or more ask "are you sure?" first (click or /pay confirm).
# 0 = never ask.
confirm-above: 10000
# Seconds between payments per player. 0 = no cooldown. Bypass: jpeconomy.bypass.cooldown
cooldown-seconds: 0
# Percentage taken from every payment (the receiver gets the rest). 0 = no tax.
tax-percent: 0
# /payrequest <player> <amount> asks someone for money, with a [PAY] button in chat.
requests:
enabled: true
# How long a request stays valid.
expire-seconds: 60
# Seconds between requests per player. 0 = no cooldown. Bypass: jpeconomy.bypass.cooldown
cooldown-seconds: 10
baltop:
# false = /baltop is turned off.
enabled: true
# How often the list is recalculated.
refresh-seconds: 300
# Players shown per page.
per-page: 10
# How many places are kept (also the limit for %jpeconomy_top_name_<n>%).
size: 100
# Names that never appear in /baltop (e.g. admin or shop accounts).
exclude: []
# /withdraw <amount> turns money into a paper note; right-click the note to cash it in.
# Every note can only be cashed in once, so duplicated notes are worthless.
banknotes:
enabled: true
min-amount: 1
material: PAPER
# Enchantment shine on the note.
glow: true
transactions:
# Keep a log of payments, admin changes and banknotes (see /eco history <player>).
log-enabled: true
# Also log money paid or taken by other plugins (jobs, shops...). Creates many rows.
log-plugin-payments: false
# Delete log entries older than this many days. 0 = keep forever.
retention-days: 30
# Entries per page in /eco history.
history-per-page: 8
features:
# Register the %jpeconomy_...% placeholders when PlaceholderAPI is installed.
placeholderapi: true
# Offer the balances to other plugins through Vault.
vault: true
# Tell players their balance when they join.
balance-on-join: false
sounds:
# false = no economy sounds at all.
enabled: true
# Format: SOUND or SOUND:volume:pitch (volume 0-1, pitch 0.5-2).
pay-sent: ENTITY_EXPERIENCE_ORB_PICKUP
pay-received: 'BLOCK_NOTE_BLOCK_PLING:1:1.6'
withdraw: ITEM_BOOK_PAGE_TURN
redeem: 'ENTITY_PLAYER_LEVELUP:0.6:1.6'
failure: ENTITY_VILLAGER_NO
# ----------------------------------------------------------
# Network (several servers behind Velocity or BungeeCord)
# ----------------------------------------------------------
# One balance on every server: set storage.type to MYSQL with the same database on
# all servers, then turn this on. A change on one server is picked up by the others
# right away, and /pay reaches players who are on another server.
# MYSQL = messages go through that same database (nothing else to install).
# REDIS = messages go through a Redis server (instant). Balances still live in MySQL.
network:
enabled: false
# A short name for this server (only used in logs).
server-name: 'lobby'
messenger: MYSQL
# How often the MySQL messenger looks for news, in milliseconds.
mysql-poll-ms: 1000
redis:
host: localhost
port: 6379
password: ''
channel: jpSupport
Guides and the docs of every JP plugin are on the JP Plugins website. Questions, bugs or ideas? Join the JP Plugins Discord.
License
JPEconomy is free to use on any server, including servers that make money, but it is not open source. Don't reupload, sell or share modified copies of it. The full terms are in LICENSE.txt, which is also inside the jar.