Horizons Economy

插件

· 作者 raawn

一个功能齐全的经济插件,适用于 Paper 服务器,支持 Vault 集成、实体纸币系统、银行账户等。

0 本站下载 0 关注 更新于 4 周前

最新 1.0.3 · 26.3 · Bukkit / Paper

一键开服(送7天)

headerimage

HorizonsEconomy

一款为 Paper 服务器打造的特性丰富的经济插件,支持 Vault 集成、实体钞票系统、银行账户等功能。 HorizonsEconomy 超越了简单的余额管理器——它提供了一个完整的经济框架,包括带利息的银行账户、死亡惩罚机制、实体钞票以及可配置的玩家间支付税收系统。采用多种存储后端构建以保障性能,并支持通过完整消息本地化进行深度自定义。


核心亮点

  • 完整的 Vault 经济提供商 -- 与任何兼容 Vault 的插件无缝协作
  • 实体钞票系统,提供具象化的游戏内货币
  • 银行账户系统,支持利息累积并配备专用图形界面 (GUI)
  • 死亡惩罚,可配置现金损失比例
  • 多种存储后端:JSON、SQLite、MySQL(支持 HikariCP 连接池)
  • 多语言支持(包含英语和德语)
  • 深度集成超过 8 种自定义物品插件,用于实现 GUI 元素

功能详情

Vault 经济提供商

HorizonsEconomy 注册为一个完整的 Vault 经济提供商。安装后,所有使用 Vault 进行经济管理的插件都将自动与 HorizonsEconomy 配合工作。这包括商店插件、拍卖行、小游戏插件、箱子插件等。您服务器的整个经济体系将通过一个统一的系统运行。

可配置货币

自定义货币的外观和感觉的各个方面:

  • 货币名称 -- 设置单数和复数形式(例如,“Dollar” / “Dollars”,“Coin” / “Coins”)
  • 显示格式 -- 控制向玩家展示余额的方式
  • 小数位数 -- 配置精度(0 表示整数,2 表示分等)
  • 数字缩写 -- 大额余额将显示为人类可读的缩写:
    • K 代表千
    • M 代表百万
    • B 代表十亿
    • T 代表万亿
  • 起始余额 -- 设置新玩家获得的初始货币数量
  • 最大余额 -- 设置上限以防止恶性通货膨胀

支付系统

/pay 命令允许玩家在内置安全功能的情况下互相发送货币:

  • 大额支付确认 -- 当支付金额超过可配置的阈值时,会提示发送者确认,防止意外超额支付
  • 确认绕过权限 -- 受信任的玩家可跳过确认步骤
  • 支付开关 -- 玩家可以使用 /paytoggle 启用或禁用接收付款,这对主播或不想接收未经请求转账的玩家很有用
  • 支付税收 -- 每笔支付都会扣除可配置的百分比
    • 税收收入可以设置为 销毁(从经济系统中移除,充当资金回收机制)或 发送给特定玩家(例如服务器银行账号)
    • 可为指定玩家提供免税权限

实体钞票系统

HorizonsEconomy 包含独特的钞票功能,连接数字余额与游戏内的物理物品:

  • 制作钞票 -- 使用 /withdraw <amount> 将余额转换为物理物品
  • 兑换钞票 -- 右键点击钞票将其存回您的余额
  • 钞票是完全可用的物品,可以交易、存入箱子、掉落和交换
  • 每张钞票都显示其面值且防篡改
  • 适用于实体商店、交易、活动,并为服务器的经济增添沉浸感

银行账户系统

玩家可以访问独立的银行账户,功能类似储蓄账户,可通过直观的图形界面访问:

  • 在钱包和银行之间存取资金
  • 专用 GUI -- 使用 /bank 打开简洁的可视化界面
  • 独立于主余额 -- 银行资金单独追踪
  • 银行账户作为受保护的储蓄,不受死亡惩罚影响

银行利息系统

通过对银行余额奖励利息来鼓励玩家储蓄:

  • 可配置利率 -- 设置每个时间间隔内赚取的百分比
  • 可配置间隔 -- 定义利息支付的频率(例如每小时、每天)
  • 利息上限 -- 设置每个时间间隔的最大利息 payout 以防止滥用
  • 最低余额要求 -- 只有超过阈值的余额才能产生利息
  • 利息会在后台自动计算和分发

死亡惩罚系统

为死亡添加经济后果,创造有意义的生存激励:

  • 基于百分比的损失 -- 玩家死亡时将损失钱包余额的可配置百分比
  • 最低损失 -- 设置惩罚金额的底线
  • 最高损失 -- 设置上限以防止毁灭性的损失
  • 银行豁免 -- 存储在银行账户中的资金免受死亡惩罚,鼓励玩家使用银行系统
  • 绕过权限 -- 免除特定玩家或阶层的死亡惩罚

余额排行榜

分页显示服务器上最富有玩家的排行榜:

  • 分页 -- 通过页面控件浏览完整排名
  • 可配置更新间隔 -- 排行榜按时间表刷新以减少性能影响
  • 排除权限 -- 使用 horizonseco.balancetop.exclude 隐藏员工或特定玩家
  • 可通过 /balancetop 或 /baltop 访问

离线支付通知

当玩家处于离线状态收到付款时,他们将在下次登录时收到通知。即使玩家当时不在线,也能随时知道余额是否发生变化。

交易日志记录

每笔经济交易都会被记录,以便审计和处理争议:

  • 基于文件的日志记录 -- 所有交易均写入带有时间戳、涉及玩家、金额和交易类型的日志文件
  • 控制台日志记录 -- 可选地将交易输出到服务器控制台,以便实时监控
  • 涵盖支付、银行操作、管理员命令、纸币发行与兑换、死亡惩罚以及利息发放

自动保存系统

玩家数据会按照可配置的时间间隔在后台自动保存。这确保了数据安全,同时不会影响常规游戏过程中的服务器性能。自动保存在独立线程上运行,以避免阻塞主服务器线程。


命令

玩家命令

命令 别名 描述
/balance /bal, /money 查看您当前的余额
/balance <player> /bal <player> 查看其他玩家的余额
/balancetop /baltop 查看服务器财富排行榜
/pay <player> <amount> 向其他玩家发送货币
/paytoggle 切换是否接收付款
/withdraw <amount> 将余额转换为实体纸币物品
/bank 打开银行账户 GUI

管理员命令

命令 描述
/economy set <player> <amount> 将玩家的余额设置为指定金额
/economy give <player> <amount> 向玩家余额中添加货币
/economy take <player> <amount> 从玩家余额中移除货币
/economy reset <player> 将玩家余额重置为初始余额
/economy reload 重新加载插件配置和语言文件

/economy 命令也可以用作 /eco。


权限

玩家权限

权限 描述
horizonseco.balance 查看自己的余额
horizonseco.balance.others 查看其他玩家的余额
horizonseco.balancetop 查看余额排行榜
horizonseco.balancetop.exclude 将自己排除在排行榜之外
horizonseco.pay 向其他玩家发送付款
horizonseco.pay.taxexempt 免除支付税
horizonseco.pay.confirmbypass 跳过大额付款确认提示
horizonseco.paytoggle 开启或关闭 incoming payments(接收付款)
horizonseco.withdraw 创建实体纸币
horizonseco.redeem 兑换(右键点击)实体纸币
horizonseco.bank 访问银行账户 GUI
horizonseco.bank.deposit 向银行存入资金
horizonseco.bank.withdraw 从银行取出资金
horizonseco.deathpenalty.bypass 绕过死亡惩罚系统

管理员权限

权限 描述
horizonseco.admin.* 授予所有管理员经济命令的访问权限

配置

HorizonsEconomy 提供了广泛的配置选项。关键设置包括:

经济设置

  • 起始余额 -- 新玩家首次加入时获得的货币数量
  • 最大余额 -- 玩家可持有的最高余额
  • 小数位数 -- 货币显示的小数位数(0-4)
  • 货币名称 -- 货币的单数和复数形式
  • 显示格式 -- 余额如何格式化并展示给玩家

支付设置

  • 税率 -- 从玩家间交易中扣除的百分比
  • 税收去向 -- 选择作废征税货币或将税款发送给指定玩家
  • 确认阈值 -- 需要确认的付款金额上限
  • 支付开关默认值 -- 新玩家的付款功能是启用还是禁用

纸币设置

  • 最小提现额 -- 可提取为纸币的最小金额
  • 最大提现额 -- 单张纸币的最大金额

银行设置

  • 利率 -- 每个时间间隔内银行余额产生的百分比收益
  • 利息间隔 -- 利息支付的频率(以分钟为单位)
  • 利息上限 -- 每次发放的最高利息收益
  • 获取利息的最低余额 -- 赚取利息所需的阈值余额

死亡惩罚设置

  • 启用/禁用 -- 切换整个死亡惩罚系统
  • 损失百分比 -- 死亡时损失的钱包余额比例
  • 最小损失 -- 惩罚的下限
  • 最大损失 -- 惩罚的上限

存储设置

  • 存储类型 -- 在 JSON、SQLite 或 MySQL 之间选择
  • MySQL 连接详情 -- 主机、端口、数据库、用户名、密码
  • 自动保存间隔 -- 数据保存到磁盘的频率(以分钟为单位)

排行榜设置

  • 更新间隔 -- 余额排行榜重新计算的频率
  • 每页条目数 -- 每个排行榜页面显示的玩家数量

所有配置文件均以合理的默认值生成,并且每个选项都包含内联注释。


数据库支持

JSON(默认)

玩家数据存储在插件数据文件夹中的单独 JSON 文件中。简单且易于手动检查。适用于小型到中型服务器。

SQLite

一个存储在插件数据文件夹中的单文件关系型数据库。无需外部设置。对于拥有大量玩家的服务器,其性能优于 JSON。推荐用于大多数单服务器设置。

MySQL

完全支持 MySQL,并使用 HikariCP 连接池 以实现负载下的最佳性能。推荐用于大型服务器或网络,其中多个服务器需要共享经济数据。在配置文件中配置您的连接详情,插件将处理其余部分,包括自动表创建和架构管理。


兼容性

服务器要求

要求 版本
服务器软件 Paper 1.21 或更高版本
Java Java 21 或更高版本
Vault 必需(提供经济 API 桥接)

支持的自定义物品插件 (GUI)

HorizonsEconomy 支持来自以下插件的自定义物品,可用于银行界面等 GUI 元素:

Plugin Support
ItemsAdder Full support
Oraxen Full support
Nexo Full support
HeadDatabase Full support
MMOItems Full support
Slimefun Full support
ExecutableItems Full support
EcoItems Full support

可选集成

Plugin Integration
PlaceholderAPI Exposes economy placeholders (balance, currency name, rank, etc.) for use in scoreboards, holograms, tab lists, chat formats, and more

快速上手

安装

  1. Download the latest version of HorizonsEconomy
  2. Place the .jar file in your server's plugins folder
  3. Ensure you have Paper 1.21+, Java 21, and Vault installed
  4. Start or restart your server
  5. Configuration and language files are generated automatically on first launch

快速配置

  1. Set your currency name -- open config.yml and set the currency-name-singular and currency-name-plural fields to your desired currency name
  2. Configure the starting balance -- set starting-balance to the amount new players should receive
  3. Set up the tax system -- adjust pay-tax-rate and choose whether taxed currency is voided or collected
  4. Enable the bank -- ensure the bank system is enabled and configure interest settings to your liking
  5. Configure the death penalty -- enable or disable and set the percentage, minimum, and maximum values
  6. Choose your storage backend -- select JSON, SQLite, or MySQL based on your server size
  7. Reload -- run /eco reload to apply changes without restarting
  8. Grant permissions -- give players the appropriate permissions for their rank

推荐权限设置

For a typical server, consider the following permission structure:

Default players:

horizonseco.balance
horizonseco.balancetop
horizonseco.pay
horizonseco.paytoggle
horizonseco.withdraw
horizonseco.redeem
horizonseco.bank
horizonseco.bank.deposit
horizonseco.bank.withdraw

Staff members (in addition to defaults):

horizonseco.balance.others
horizonseco.pay.taxexempt
horizonseco.pay.confirmbypass
horizonseco.deathpenalty.bypass
horizonseco.balancetop.exclude
horizonseco.admin.*

自定义消息

All player-facing messages are fully customizable. Language files are located in the plugin's lang folder. HorizonsEconomy ships with complete English and German translations. You can edit existing translations or create your own language file.


PlaceholderAPI

HorizonsEconomy provides an extensive set of placeholders (requires PlaceholderAPI):

Player Placeholders

Placeholder Description
%horizonseconomy_balance% Player's wallet balance (formatted with currency symbol)
%horizonseconomy_balance_raw% Player's wallet balance (raw number)
%horizonseconomy_balance_compact% Player's wallet balance in compact format (e.g., 1.5K)
%horizonseconomy_accepting_payments% Whether the player accepts payments (true/false)
%horizonseconomy_bank_balance% Player's bank balance (formatted)
%horizonseconomy_bank_balance_raw% Player's bank balance (raw number)
%horizonseconomy_bank_balance_compact% Player's bank balance in compact format
%horizonseconomy_player_total_balance% Sum of wallet + bank balance (formatted)
%horizonseconomy_player_total_balance_raw% Sum of wallet + bank balance (raw number)

Server Placeholders

Placeholder Description
%horizonseconomy_interest_rate% Current interest rate (e.g., "2.5%")
%horizonseconomy_interest_rate_raw% Interest rate as raw number
%horizonseconomy_interest_interval% Interest payout interval in minutes
%horizonseconomy_total_balance% Total economy balance across all players (formatted)
%horizonseconomy_combined_total_balance% Total economy balance across all players (raw)
%horizonseconomy_combined_total_balance_formatted% Total economy balance (formatted)

Balance Top Placeholders

Use <N> as the rank position (e.g., 1 for richest player):

Placeholder Description
%horizonseconomy_richest_<N>_name% Name of the Nth richest player
%horizonseconomy_richest_<N>_uuid% UUID of the Nth richest player
%horizonseconomy_richest_<N>_balance% Balance of the Nth richest player (raw)
%horizonseconomy_richest_<N>_balance_formatted% Balance of the Nth richest player (formatted)

常见问题

Does this replace Essentials Economy? Yes. HorizonsEconomy is a standalone Vault economy provider. If you are currently using Essentials for economy, you can switch to HorizonsEconomy by removing Essentials' economy component and installing this plugin. All Vault-compatible plugins will automatically use HorizonsEconomy.

Can players dupe banknotes? Banknotes are protected against common duplication methods. Each banknote contains unique metadata that is validated on redemption. However, as with any item-based system, ensure your server has proper anti-dupe protections in place.

Is bank money safe from the death penalty? Yes. The death penalty only affects the player's wallet balance. Funds stored in the bank account are explicitly excluded, which gives players a meaningful reason to use the banking system.

What happens if a player is paid while offline? The payment is processed normally and their balance is updated. When they next log in, they receive a notification informing them of the payment, including who sent it and the amount.

我可以从其他经济插件迁移吗? HorizonsEconomy 提供了管理员命令以手动设置玩家余额。对于大规模迁移,您可以在服务器离线时使用 /eco set 命令或直接修改存储文件。

利息系统在玩家离线时是否生效? 无论玩家是否在线,只要账户满足最低余额要求,利息都会按照配置的时间间隔进行计算和发放。

什么是 HikariCP? HikariCP 是一个高性能的 JDBC 连接池库。在使用 MySQL 时,HorizonsEconomy 使用 HikariCP 来高效管理数据库连接,从而减少开销并在高负载下提升性能。


支持

如果您遇到任何问题、有功能建议或需要帮助配置:

  • Issue Tracker(问题追踪器) -- 在项目的问题追踪器上报告错误并提出功能请求
  • Discord -- 加入我们的社区 Discord 服务器,获取实时支持和讨论
  • Documentation(文档) -- 查阅插件的 Wiki,获取详细指南和示例

在报告问题时,请包含以下信息:

  • 您的 Paper 服务器版本
  • 您的 Java 版本
  • HorizonsEconomy 的版本
  • 您的 Vault 版本
  • 您服务器上其他与经济相关的插件列表
  • 相关的日志输出或错误消息
  • 重现问题的步骤

HorizonsEconomy 专为性能、可靠性和灵活性而构建。它为任何 Paper 服务器提供坚实的经济基础,从小型社区到大型网络皆适用。感谢您选择 HorizonsEconomy。

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源