EasyEco — 轻量级多货币经济系统
一款快速、现代的经济插件,支持多货币余额、交易历史、GUI 排行榜以及完整的 Vault 1 + VaultUnlocked (Vault 2) 支持。单个 JAR 文件包含所有功能——无付费版,采用 MIT 许可证。
功能特性
? 核心经济系统
- 多货币余额(
economy.currencies.* —— 符号、单/复数名称、小数格式化)
- 初始/最小/最大余额限制,可选负余额
/pay 命令支持真实交易税——税收从经济系统中燃烧销毁(不重新流通),并记录为 PAY_TAX
- 原子性、线程安全的操作,转账失败时自动回滚
- 交易事件可被其他插件取消(EasyEcoTransactionEvent)
? 交易历史
/eco history <player> —— 查看最近交易,直接从数据库读取(easyeco_history 表)
- 每笔存款/取款/设置/支付均记录类型、金额和原因
- 默认启用(
logging.log-to-database: true)——开箱即用
- 也支持可选的文件日志记录(
logs/transactions.log)
? 排行榜 GUI
- 45 格排名 GUI,显示玩家头像并支持分页
- 紧凑的余额格式(
1.5K$、2.3M$、10B$)
- 文本模式:
/baltop 1 -text(也可从控制台执行)
- 缓存排行榜(默认刷新间隔 60 秒,可配置)
? 世界经济
- 按世界分组的经济系统(
economy.world-economy)——不同世界组拥有独立余额
- 自动由 Vault 和 PlaceholderAPI 查询
⚡ 性能与存储
- RAM 缓存在线玩家数据——每次余额查询零数据库读取
- 离线余额使用 TTL 缓存(默认 60 秒,读取时刷新)
- 脏标记自动保存(批量插入),安全退出玩家(异步保存确认后才移除缓存条目)
- SQLite(内置,零配置)和通过 HikariCP 连接池连接的 MySQL —— JDBC 驱动已嵌入 JAR 中,无需额外安装
- 优雅关闭:在关闭数据库前同步刷新所有缓存余额
? 集成支持
- Vault 1 和 VaultUnlocked (Vault 2) —— 两者均注册为经济提供商(各自可独立开关)
- PlaceholderAPI —— 一个扩展
%easyeco_*%(见下方占位符说明)
- bStats 和更新检查器(可选)
- 开发者 API
pl.materiz66.easyeco.api.EasyEcoAPI + 事件(EasyEcoBalanceChangeEvent, EasyEcoTransactionEvent)
- EssentialsX 导入 ——
/eco import essentials(异步、安全)
占位符(PlaceholderAPI)
| 占位符 |
返回值 |
%easyeco_balance% |
余额,保留两位小数(1500.00) |
%easyeco_balance_formatted% |
紧凑余额 + 符号(1.5K$) |
%easyeco_balance_world_<group/world>% |
目标组或世界的余额(1500.00) |
%easyeco_balance_formatted_world_<group/world>% |
目标组或世界的紧凑余额(1.5K$) |
%easyeco_currency_symbol% / %easyeco_currency_name% |
当前活跃货币符号 / 复数名称 |
%easyeco_baltop_position% |
排名位置(1…99, 100+) |
%easyeco_baltop_name_<pos>% / %easyeco_baltop_balance_<pos>% / %easyeco_baltop_balance_formatted_<pos>% |
前 100 名条目(从 1 开始索引) |
命令
| 命令 |
描述 |
权限 |
/balance [player] (/bal, /money) |
查看余额 |
easyeco.balance / easyeco.balance.others |
/pay <player> <amount> |
转账(含冷却时间 + 税费) |
easyeco.pay |
/baltop [page] [-text] |
排行榜 GUI / 文本输出 |
easyeco.baltop |
| `/eco give |
take |
set |
/eco history <player> · /eco reload · /eco info |
历史记录 / 重载 / 诊断信息 |
easyeco.admin.* |
/eco import essentials |
从 EssentialsX 导入数据 |
easyeco.admin.import |
easyeco.admin(默认:op)包含所有 easyeco.admin.* 权限作为子权限。
要求
- Java 21
- Paper / Purpur 1.21+(或兼容分支)—— API 版本 1.21
- 可选:Vault 1, VaultUnlocked, PlaceholderAPI
安装方法
- 下载 JAR 文件并将其放入
plugins/ 目录
- 重启服务器(SQLite 数据库
plugins/EasyEco/database.db 会自动创建)
- 完成。如需使用 MySQL,请在
config.yml 中设置 storage.type: MYSQL 并填写 storage.mysql.* 相关配置项
配置说明
所有设置位于 plugins/EasyEco/config.yml:
economy.* —— 货币、初始/最小/最大余额、/pay 限制与税率、冷却时间
storage.* —— SQLite/MySQL、HikariCP 连接池大小、自动保存间隔
baltop.*, vault.*, integrations.*, logging.*, messages-file, update-checker, bstats, debug
语言文件:en_us.yml(默认)、pl_pl.yml、de_de.yml —— 通过 messages-file 切换。
许可证
MIT —— 免费,永久有效。请参阅仓库中的 LICENSE 文件。
*文档由人工智能生成
EasyEco — Lightweight Multi-Currency Economy
A fast, modern economy plugin with multi-currency balances, transaction history, GUI baltop and full Vault 1 + VaultUnlocked (Vault 2) support. One JAR, every feature enabled — no paid edition, MIT licensed.
Features
? Core economy
- Multi-currency balances (
economy.currencies.* — symbol, singular/plural names, decimal formatting)
- Starting / min / max balance limits, optional negative balances
/pay with a real transaction tax — tax is burned from the economy (not re-circulated) and logged as PAY_TAX
- Atomic, thread-safe operations with rollback on failed transfers
- Transaction events are cancelable by other plugins (EasyEcoTransactionEvent)
? Transaction history
/eco history <player> — recent transactions, read directly from the database (easyeco_history table)
- Every deposit / withdraw / set / pay logged with type, amount and reason
- Enabled by default (
logging.log-to-database: true) — works out of the box
- Optional file logging too (
logs/transactions.log)
? Baltop GUI
- 45-slot ranking GUI with player heads and pagination
- Compact balance formatting (
1.5K$, 2.3M$, 10B$)
- Text mode:
/baltop 1 -text (also from console)
- Cached ranking (default refresh 60s, configurable)
? World Economy
- Per-world economy groups (
economy.world-economy) — separate balances per world group
- Automatically queried by Vault and PlaceholderAPI
⚡ Performance & storage
- RAM cache for online players — zero DB reads per balance query
- Offline balances cached with TTL (default 60s, read-through refresh)
- Dirty-flag autosave (batch inserts), safe player-unload (cache entry removed only after the async save confirms)
- SQLite (bundled, zero-config) and MySQL via HikariCP connection pool — JDBC drivers shaded in the JAR, nothing to install
- Graceful shutdown: all cached balances flushed synchronously before closing the DB
? Integrations
- Vault 1 and VaultUnlocked (Vault 2) — both registered as economy providers (each toggleable)
- PlaceholderAPI — one expansion
%easyeco_*% (see placeholders below)
- bStats and update checker (optional)
- Developer API
pl.materiz66.easyeco.api.EasyEcoAPI + events (EasyEcoBalanceChangeEvent, EasyEcoTransactionEvent)
- EssentialsX import —
/eco import essentials (async, safe)
Placeholders (PlaceholderAPI)
| Placeholder |
Returns |
%easyeco_balance% |
Balance, 2 decimals (1500.00) |
%easyeco_balance_formatted% |
Compact balance + symbol (1.5K$) |
%easyeco_balance_world_<group/world>% |
Balance in target group or world (1500.00) |
%easyeco_balance_formatted_world_<group/world>% |
Compact balance in target group or world (1.5K$) |
%easyeco_currency_symbol% / %easyeco_currency_name% |
Active currency symbol / plural name |
%easyeco_baltop_position% |
Ranking position (1…99, 100+) |
%easyeco_baltop_name_<pos>% / %easyeco_baltop_balance_<pos>% / %easyeco_baltop_balance_formatted_<pos>% |
Top-100 entries (1-indexed) |
Commands
| Command |
Description |
Permission |
/balance [player] (/bal, /money) |
Check balance |
easyeco.balance / easyeco.balance.others |
/pay <player> <amount> |
Transfer (cooldown + tax) |
easyeco.pay |
/baltop [page] [-text] |
Ranking GUI / text |
easyeco.baltop |
| `/eco give |
take |
set |
/eco history <player> · /eco reload · /eco info |
History / reload / diagnostics |
easyeco.admin.* |
/eco import essentials |
Import from EssentialsX |
easyeco.admin.import |
easyeco.admin (default: op) includes all easyeco.admin.* permissions as children.
Requirements
- Java 21
- Paper / Purpur 1.21+ (or compatible fork) — API 1.21
- Optional: Vault 1, VaultUnlocked, PlaceholderAPI
Installation
- Download the JAR and drop it into
plugins/
- Restart the server (SQLite database
plugins/EasyEco/database.db is created automatically)
- Done. For MySQL set
storage.type: MYSQL and fill storage.mysql.* in config.yml
Configuration
All settings in plugins/EasyEco/config.yml:
economy.* — currencies, starting/min/max balance, /pay limits and tax, cooldown
storage.* — SQLite/MySQL, HikariCP pool size, autosave interval
baltop.*, vault.*, integrations.*, logging.*, messages-file, update-checker, bstats, debug
Languages: en_us.yml (default), pl_pl.yml, de_de.yml — switch with messages-file.
License
MIT — free, forever. See the LICENSE file in the repository.
*docs created by artyfical inteligence
评论 0
登录后参与评分
还没有评论,来抢沙发吧