GemEngine – 插件说明
GemEngine 是一款适用于 Paper 服务器的 Minecraft 插件,提供灵活的多经济系统。它允许你为每个玩家管理多个独立的货币,并通过命令和 PlaceholderAPI 进行访问。
⚙️ 依赖项
? 文件
config.yml – 配置经济系统
这是定义由该插件管理的所有货币的地方。
economies:
gems:
name: "Gems" # 货币显示名称
allow-pay: true # 玩家之间是否可以互相转账?
coins:
name: "Coins"
allow-pay: false
提示: 如果安装了 Vault + Essentials,服务器启动时会自动生成一个对应 Essentials 经济的条目——无需手动设置。
data.yml – 玩家数据
所有玩家的余额都存储在此文件中。此文件由系统自动管理,不应手动编辑。
#示例
550e8400-e29b-41d4-a716-446655440000:
gems: 150.0
coins: 320.50
? 在 4.0.0 或更高版本中,此文件已被数据库取代。
? 命令
/gpay <economy> <player> <amount>
将特定数量的货币转账给另一名玩家。
| 参数 |
描述 |
<economy> |
config.yml 中的经济键值(例如 gems) |
<player> |
目标玩家的名称(必须在线) |
<amount> |
要转账的数量(必须为正数) |
示例:
/gpay gems Steve 50
⚠️ 转账必须在 config.yml 中针对每个经济单独启用,即设置 allow-pay: true。发送方还需要有足够的余额。
/gemengine eco <set|add|remove> <economy> <player> <amount>
用于手动管理玩家余额的管理员命令。
| 操作 |
描述 |
set |
将余额设置为指定值 |
add |
向余额增加一定数量 |
remove |
从余额中扣除一定数量(最低为 0,不允许负数余额) |
示例:
/gemengine eco set gems Steve 500
/gemengine eco add coins Steve 100
/gemengine eco remove gems Steve 25
? 权限
| 权限 |
描述 |
gemengine.admin |
访问 /gemengine eco 命令的权限 |
? 占位符 (PlaceholderAPI)
占位符格式为:
%gemengine_<economy>%
<economy> 部分对应于 config.yml 中定义的键值。
示例:
| 占位符 |
返回值 |
%gemengine_gems% |
玩家在 "gems" 经济中的余额 |
%gemengine_coins% |
玩家在 "coins" 经济中的余额 |
返回值始终保留 2 位小数,例如 150.00
? Vault 集成
如果安装了 Vault 以及诸如 EssentialsX 之类的经济插件,GemEngine 将在启动时自动检测到它,并在 config.yml 中添加相应的条目。
示例: 安装了 EssentialsX 并使用 Dollars 作为其货币。
在第一次服务器启动时,控制台将显示以下内容:
[GemEngine] Vault Economy 'Essentials Economy' detected!
[GemEngine] Entry 'essentials_economy' has been automatically added to config.yml.
[GemEngine] Placeholder: %gemengine_essentials_economy%
随后,config.yml 将自动更新包含该条目:
economies:
essentials_economy:
name: "Dollars"
allow-pay: false
注意: allow-pay 被有意设置为 false,以防止意外启用转账功能。这可以在 config.yml 中手动更改。如需更多帮助和解释,请查看 config.yml 和 message.yml。
? 安装
- 将
GemEngine.jar 放入服务器的 plugins/ 文件夹中
- 确保也安装了 PlaceholderAPI
- 启动服务器
- 在
plugins/GemEngine/config.yml 中添加你自己的经济系统
- 重启服务器或重载插件
GemEngine – Plugin Description
GemEngine is a Minecraft plugin for Paper servers that provides a flexible multi-economy system. It allows you to manage multiple independent currencies per player, accessible via commands and PlaceholderAPI.
⚙️ Requirements
| Plugin |
Required? |
Purpose |
| PlaceholderAPI |
❌ Optional |
Provides the %gemengine_...% placeholders |
| Vault |
❌ Optional |
Automatic detection of installed economies (e.g. Essentials) |
? Files
config.yml – Configure Economies
This is where all currencies managed by the plugin are defined.
economies:
gems:
name: "Gems" # Display name of the currency
allow-pay: true # Can players transfer to each other?
coins:
name: "Coins"
allow-pay: false
Tip: If Vault + Essentials are installed, an entry for the Essentials economy will be generated automatically on server start — no manual setup required.
data.yml – Player Data
All player balances are stored here. This file is managed automatically and should not be edited manually.
#Example
550e8400-e29b-41d4-a716-446655440000:
gems: 150.0
coins: 320.50
? This was replaced by a database in version 4.0.0 or higher.
? Commands
/gpay <economy> <player> <amount>
Transfers an amount of a specific currency to another player.
| Argument |
Description |
<economy> |
The economy key from config.yml (e.g. gems) |
<player> |
Name of the target player (must be online) |
<amount> |
The amount to transfer (must be positive) |
Example:
/gpay gems Steve 50
⚠️ Transfers must be enabled per economy in config.yml via allow-pay: true. The sender also needs a sufficient balance.
/gemengine eco <set|add|remove> <economy> <player> <amount>
Admin command for manually managing player balances.
| Action |
Description |
set |
Sets the balance to a specific value |
add |
Adds an amount to the balance |
remove |
Deducts an amount from the balance (minimum 0, no negative balance) |
Examples:
/gemengine eco set gems Steve 500
/gemengine eco add coins Steve 100
/gemengine eco remove gems Steve 25
? Permissions
| Permission |
Description |
gemengine.admin |
Access to /gemengine eco |
? Placeholders (PlaceholderAPI)
The placeholder format is:
%gemengine_<economy>%
The <economy> part corresponds to the key defined in config.yml.
Examples:
| Placeholder |
Returns |
%gemengine_gems% |
The player's balance in the "gems" economy |
%gemengine_coins% |
The player's balance in the "coins" economy |
Values are always returned with 2 decimal places, e.g. 150.00
? Vault Integration
If Vault is installed alongside an economy plugin such as EssentialsX, GemEngine will automatically detect it on startup and add a matching entry to config.yml.
Example: EssentialsX is installed and uses Dollars as its currency.
On the first server start, the following will appear in the console:
[GemEngine] Vault Economy 'Essentials Economy' detected!
[GemEngine] Entry 'essentials_economy' has been automatically added to config.yml.
[GemEngine] Placeholder: %gemengine_essentials_economy%
The config.yml will then be automatically updated with this entry:
economies:
essentials_economy:
name: "Dollars"
allow-pay: false
Note: allow-pay is intentionally set to false to prevent accidental transfers from being enabled. This can be changed manually in config.yml. For more help and explanations look in the config.yml and message.yml.
? Installation
- Drop
GemEngine.jar into your server's plugins/ folder
- Make sure PlaceholderAPI is installed as well
- Start the server
- Add your own economies in
plugins/GemEngine/config.yml
- Restart the server or reload the plugin.
评论 0
登录后参与评分
还没有评论,来抢沙发吧