? 概述
eEconomy 是一款专为现代 Paper、Purpur 和多线程 Folia 服务器从头打造的最先进的多货币经济引擎。
受够了笨拙的单货币插件、数据库死锁和经济重复漏洞?eEconomy 提供企业级解决方案,具备无限独立货币、动态命令生成、带音频反馈(SFX)的交互式箱子 GUI 以及跨服务器的 Redis 同步功能。
无论你运行的是 SMP、生存、空岛、监狱还是多服务器网络,eEconomy 都能通过原子数据库事务和防死锁并发控制,提供银行级的可靠性。
? 主要特性
? 无限动态多货币
- 只需在
currencies/ 中添加一个 .yml 文件,即可创建任意数量的隔离或相互关联的货币(如 Coins、Gems、Event Tokens、Crystals 等)。
- 配置每货币属性:显示名称、符号、小数精度、最小/最大交易限额、初始余额、转账权限及转账税费。
⚡ 自动生成的按货币命令
- 当你添加类似
gems.yml 的货币时,插件会在启动时自动注册完整的命令树:
/gems — 查看个人宝石余额。
/gems balance <player> — 检查其他玩家的宝石数量。
/gems pay <player> <amount> — 发送宝石,支持转账验证和税费计算。
/gems top [page] — 查看宝石排行榜排名。
/gems give|take|set <player> <amount> — 专用的管理操作。
? 交互式 Baltop 矩阵 GUI 与钱包
- 丰富的 Baltop GUI (
/baltop): 包含 6 格的箱子菜单,带有用于切换货币的分类标签、分页、带描述的玩家头像皮肤、等级徽章以及响应式音效。
- 统一钱包 GUI (
/wallet): 直观的库存概览,显示玩家拥有的所有已注册货币及其余额。
? 动态音频反馈 (SFX)
- 用令人愉悦的音频提示提升玩家体验:
- 发送/接收付款时的轻快铃声。
- 浏览排行榜页面时的翻页声。
- 切换货币标签时的细微点击反馈。
- 资金不足或交易失败时的distinct错误蜂鸣声。
? 银行级反重复与并发保护
- 防死锁有序锁定: 双玩家转账根据 UUID 字典序获取锁,消除循环等待条件(哲学家进餐问题)。
- 原子事务: 在快速刷屏交易或网络峰值期间零竞态条件。
- 安全异步 I/O: 余额变更在内存中以原子保证进行处理,而数据库日志和余额刷新则在主线程之外运行。
?️ 企业级多数据库与 Redis 网络同步
- 由着色 HikariCP 6.2.0 连接池提供支持。
- 支持 SQLite(开箱即用的零设置)、MySQL、MariaDB、PostgreSQL 和 H2。
- Redis Pub/Sub 同步: 即时失效并同步 Velocity / BungeeCord 代理网络 across 的玩家余额缓存。
? 无缝生态系统集成
- Vault API: 作为主要的 Vault 经济提供商开箱即用。
- PlaceholderAPI (PAPI): 提供广泛的占位符,用于余额显示、格式化货币、紧凑数字格式(
1.5k、10M)及顶级排名位置。
- 基岩版友好: 兼容 Geyser & Floodgate,自动为基岩版移动/主机客户端净化排版。
? 交互式 GUI 展示
? Baltop 排行榜 GUI (/baltop)
- 分类导航(顶行): 点击货币图标(
Coins、Gems、Tokens)以即时切换排行榜。
- 玩家头像放置(第 2–5 行): 前 10 名最富有的玩家以带有自定义等级标签和格式化余额的真实玩家头颅形式显示。
- 分页控制(底行): 上一页、刷新排行榜和下一页导航,配有音效。
? 钱包 GUI (/wallet)
- 集中式仪表板,在指定槽位中显示所有服务器货币,带有自定义材质和实时余额格式化。
⌨️ 命令与权限
? 玩家命令
| 命令 |
别名 |
权限 |
描述 |
/balance [player] |
/bal, /money |
eeconomy.command.balance |
查看你的余额或另一位玩家的主要货币余额 |
/pay <player> <amount> |
— |
eeconomy.command.pay |
向其他玩家转账主要货币 |
/paytoggle |
— |
eeconomy.command.paytoggle |
开启或关闭接收付款请求 |
/baltop [page] [currency] |
/topbalance |
eeconomy.command.baltop |
打开 Baltop 排行榜 GUI 或查看聊天列表 |
/wallet |
— |
eeconomy.command.wallet |
打开多币种个人钱包 GUI |
/<currency> <subcommand> |
— |
eeconomy.currency.<id> |
每种自定义货币的专用命令套件 |
?️ 管理员命令
| 命令 |
权限 |
描述 |
/eco give <player> <amount> [currency] |
eeconomy.admin |
给予玩家货币 |
/eco take <player> <amount> [currency] |
eeconomy.admin |
扣除玩家的货币 |
/eco set <player> <amount> [currency] |
eeconomy.admin |
将玩家的余额设置为指定金额 |
/eco reset <player> [currency] |
eeconomy.admin |
将余额重置为初始默认值 |
/eco purge <days> |
eeconomy.admin |
清除超过指定天数的交易审计日志 |
/eco reload |
eeconomy.admin |
热重载所有配置文件和货币设置 |
? PlaceholderAPI 占位符
| 占位符 |
描述 |
示例输出 |
%eeconomy_balance% |
主要货币原始余额 |
12500.50 |
%eeconomy_balance_formatted% |
带符号和分隔符的主要余额 |
$12,500.50 |
%eeconomy_balance_compact% |
带紧凑后缀的主要余额 |
12.5k |
%eeconomy_balance_<currency>% |
自定义货币的原始余额 |
50 |
%eeconomy_balance_formatted_<currency>% |
自定义货币的格式化余额 |
50 ? |
%eeconomy_top_name_<currency>_<pos>% |
排名位置的用户名 |
epromite |
%eeconomy_top_balance_<currency>_<pos>% |
排名位置的余额 |
$1,000,000 |
? 安装
- 从 Modrinth 下载
eEconomy-0.0.1.jar。
- 将 jar 文件放入服务器的
plugins/ 文件夹中。
- (可选) 安装 Vault 和 PlaceholderAPI 以启用经济挂钩。
- 重启服务器。
- 在
plugins/eEconomy/currencies/ 中自定义默认货币,并在 plugins/eEconomy/messages/ 中调整消息内容。
? 支持开发者
如果你喜爱 eEconomy 并希望支持其持续开发:
- ?? Trakteer (印尼盾):
- ? Ko-fi (美元):
- ⭐ 在 GitHub 和 Modrinth 上给项目加星!
? Overview
eEconomy is a state-of-the-art multi-currency economy engine engineered from the ground up for modern Paper, Purpur, and multi-threaded Folia servers.
Tired of clunky single-currency plugins, database lockups, and economy duplication bugs? eEconomy provides an enterprise-grade solution featuring unlimited independent currencies, dynamic command generation, interactive chest GUIs with audio feedback (SFX), and cross-server Redis synchronization.
Whether you run an SMP, Survival, Skyblock, Prison, or multi-server Network, eEconomy delivers bank-grade reliability with atomic database transactions and anti-deadlock concurrency controls.
? Key Features
? Unlimited Dynamic Multi-Currencies
- Create any number of isolated or interconnected currencies (
Coins, Gems, Event Tokens, Crystals, etc.) simply by adding a .yml file in currencies/.
- Configure per-currency properties: display names, symbols, decimal precision, min/max transaction limits, starting balance, transfer permissions, and transfer taxes.
⚡ Auto-Generated Per-Currency Commands
- When you add a currency like
gems.yml, the plugin automatically registers a full command tree at startup:
/gems — Check personal gem balance.
/gems balance <player> — Inspect another player's gems.
/gems pay <player> <amount> — Send gems with transfer validation and taxes.
/gems top [page] — View gem leaderboard rankings.
/gems give|take|set <player> <amount> — Dedicated administrative management.
? Interactive Baltop Matrix GUI & Wallet
- Rich Baltop GUI (
/baltop): 6-row chest menu complete with category tabs for switching currencies, pagination, player head skins with lore, rank badges, and responsive SFX.
- Unified Wallet GUI (
/wallet): An intuitive inventory overview displaying all registered currencies and balances owned by the player.
? Dynamic Audio Feedback (SFX)
- Elevate the player experience with satisfying audio cues:
- Upbeat chime upon sending/receiving payments.
- Page-turn rustle when navigating leaderboard pages.
- Subtle click feedback when toggling currency tabs.
- Distinct error buzz when funds are insufficient or transactions fail.
? Bank-Grade Anti-Dupe & Concurrency Protection
- Anti-Deadlock Ordered Locking: Dual-player transfers acquire locks based on UUID lexicographical ordering, eliminating circular wait conditions (Dining Philosophers problem).
- Atomic Transactions: Zero race conditions during rapid spam transactions or network spikes.
- Safe Asynchronous I/O: Balance changes are processed in memory with atomic guarantees, while database logs and balance flushes run off the main thread.
?️ Enterprise Multi-Database & Redis Network Sync
- Powered by shaded HikariCP 6.2.0 connection pooling.
- Supports SQLite (out-of-the-box zero setup), MySQL, MariaDB, PostgreSQL, and H2.
- Redis Pub/Sub Synchronization: Instantly invalidates and synchronizes player balance caches across Velocity / BungeeCord proxy networks.
? Seamless Ecosystem Integration
- Vault API: Acts as the primary Vault economy provider out-of-the-box.
- PlaceholderAPI (PAPI): Extensive placeholders for balance display, formatted currencies, compact numbers (
1.5k, 10M), and top rank placements.
- Bedrock Edition Friendly: Compatible with Geyser & Floodgate, automatically sanitizing typography for Bedrock mobile/console clients.
? Interactive GUI Showcase
? Baltop Leaderboard GUI (/baltop)
- Category Navigation (Top Row): Click currency icons (
Coins, Gems, Tokens) to instantly switch leaderboards.
- Player Head Placement (Rows 2–5): Top 10 richest players displayed as real player skulls with custom rank tags and formatted balances.
- Page Controls (Bottom Row): Previous Page, Refresh Leaderboard, and Next Page navigation with sound effects.
? Wallet GUI (/wallet)
- Centralized dashboard displaying all server currencies in designated slots with custom materials and live balance formatting.
⌨️ Commands & Permissions
? Player Commands
| Command |
Aliases |
Permission |
Description |
/balance [player] |
/bal, /money |
eeconomy.command.balance |
Check your balance or another player's primary balance |
/pay <player> <amount> |
— |
eeconomy.command.pay |
Transfer primary currency to another player |
/paytoggle |
— |
eeconomy.command.paytoggle |
Toggle incoming payment requests on or off |
/baltop [page] [currency] |
/topbalance |
eeconomy.command.baltop |
Open the Baltop leaderboard GUI or view chat list |
/wallet |
— |
eeconomy.command.wallet |
Open the multi-currency personal wallet GUI |
/<currency> <subcommand> |
— |
eeconomy.currency.<id> |
Dedicated command suite for each custom currency |
?️ Admin Commands
| Command |
Permission |
Description |
/eco give <player> <amount> [currency] |
eeconomy.admin |
Give currency to a player |
/eco take <player> <amount> [currency] |
eeconomy.admin |
Deduct currency from a player |
/eco set <player> <amount> [currency] |
eeconomy.admin |
Set a player's balance to an exact amount |
/eco reset <player> [currency] |
eeconomy.admin |
Reset balance back to starting default |
/eco purge <days> |
eeconomy.admin |
Purge transaction audit logs older than specified days |
/eco reload |
eeconomy.admin |
Hot-reload all configuration files and currencies |
? PlaceholderAPI Placeholders
| Placeholder |
Description |
Example Output |
%eeconomy_balance% |
Raw primary currency balance |
12500.50 |
%eeconomy_balance_formatted% |
Primary balance with symbol & separators |
$12,500.50 |
%eeconomy_balance_compact% |
Primary balance with compact suffix |
12.5k |
%eeconomy_balance_<currency>% |
Raw balance for custom currency |
50 |
%eeconomy_balance_formatted_<currency>% |
Formatted balance for custom currency |
50 ? |
%eeconomy_top_name_<currency>_<pos>% |
Username at rank position |
epromite |
%eeconomy_top_balance_<currency>_<pos>% |
Balance at rank position |
$1,000,000 |
? Installation
- Download
eEconomy-0.0.1.jar from Modrinth.
- Place the jar file into your server's
plugins/ folder.
- (Optional) Install Vault and PlaceholderAPI for economy hooks.
- Restart your server.
- Customize default currencies in
plugins/eEconomy/currencies/ and adjust messages in plugins/eEconomy/messages/.
? Support the Developer
If you love eEconomy and want to support continued development:
- ?? Trakteer (IDR):
- ? Ko-fi (USD):
- ⭐ Star the Project on GitHub & Modrinth!
评论 0
登录后参与评分
还没有评论,来抢沙发吧