GemsEconomy 是一款功能全面的服务器经济系统解决方案。它支持单一或多种货币格式、BungeeCord/MySQL、完整的信息自定义以及 Vault 兼容,旨在帮助你的社区蓬勃发展。
plugins 文件夹。/gcurr create 命令创建你的第一种货币。- **注意**:创建的第一种货币将自动设为默认货币。你之后可以使用 `/gcurr` 的相关子命令更改默认货币。/gcurr 的其他子命令进一步调整货币设置。完成以上步骤,经济系统即可运行。
/gbalance [玩家] - 查看自己或指定玩家的余额。/geco add <玩家> <数量> [货币] - 向玩家增加指定数量的货币。/geco take <玩家> <数量> [货币] - 从玩家处扣除指定数量的货币。/geco set <玩家> <数量> [货币] - 设置玩家的货币数量。/gpay <玩家> <数量> [货币] - 向另一玩家支付货币。/gcheque write <数量> [货币] - 开具一张指定面额的支票。/gcheque redeem - 兑换手中持有的支票。/gcurrency - 查看货币管理相关的帮助。gemseconomy.command.balance - 查看自己余额的权限。gemseconomy.command.balance.other - 查看他人余额的权限。gemseconomy.command.baltop - 查看指定货币余额排行榜的权限。gemseconomy.command.cheque - 使用支票(开具和兑换)的权限。gemseconomy.command.currency - 警告:此权限包含所有货币子命令(如 /gcurr delete 或 /gcurr view)的权限。gemseconomy.command.economy - 查看经济系统帮助的权限。gemseconomy.command.give - 给予货币的权限。gemseconomy.command.set - 设置货币数量的权限。gemseconomy.command.take - 扣除货币的权限。gemseconomy.command.pay - 允许玩家进行支付的权限。gemseconomy.command.pay.<currency_plural> - 允许玩家支付特定货币的权限(默认货币也需要此权限)。gemseconomy.command.exchange.preset - 使用预设汇率兑换货币的权限。gemseconomy.command.exchange.custom - 使用自定义汇率兑换货币的权限。gemseconomy.command.exchange.custom.other - 为其他玩家兑换货币的权限。本插件提供 PlaceholderAPI 扩展。以下为可用占位符示例:
%gemseconomy_balance_default% - 默认货币的余额(原始数值)。%gemseconomy_balance_default_formatted% - 默认货币的余额(格式化后)。%gemseconomy_balance_<货币复数或单数>% - 指定货币的余额(原始数值)。%gemseconomy_balance_<货币复数或单数>_formatted% - 指定货币的余额(格式化后)。注意:旧版 GemsEconomy 的占位符列表可在此处找到。
以下是 GemsEconomy 4.0 及以上版本的 API 使用简介。
首先,你需要声明 API 类变量。请确保你的插件在 plugin.yml 中设置 GemsEconomy 为依赖项,并确保在其之后加载。
GemsEconomyAPI api = new GemsEconomyAPI();api.deposit(UUID, Amount);api.deposit(UUID, Amount, Currency);api.withdraw(UUID, Amount);api.withdraw(UUID, Amount, Currency);api.getBalance(UUID);api.getBalance(UUID, Currency);api.getCurrency(String);如需了解更多 API 详细信息,请联系开发者。插件源代码可在此处找到。
注意:以下是 GemsEconomy 3.2.1 版本的旧 API,仅作参考。
同样,需在 plugin.yml 中添加 GemsEconomy 作为依赖。
// 修改余额
GemsAPI.editBalance(EcoAction action, Player player, double amount, boolean offline);
GemsAPI.editBalance(EcoAction action, UUID uuid, double amount, boolean offline);
// 获取余额
GemsAPI.getBalance(UUID uuid); // 返回 double 数值。友情链接: 网易我的世界 | 泰拉瑞亚 | ocent云计算 | 米饭Minecraft插件文档 | 友链合作
历史访问人次:3,028,291 | 今日访问人次:12,419 | 昨日访问人次:11,147
独立 IP:4,877 | 最近24小时有3,877人访问本站
Copyright © 2019-2026 我的世界服务器列表站. All rights reserved.
❤ Powered by GermMC 京ICP备17023959号-6