CoinAPI 是一款功能强大的 Minecraft 经济插件,它提供了完整的货币系统,支持多种数据存储方式,并允许开发者通过简单的 API 进行深度集成。
MessagesFile 自定义。以下是如何在您的 Java 插件中调用 CoinAPI 的示例代码。
// 通过玩家对象获取
CoinAPI.getMoney(Player p);
// 通过玩家名称获取
CoinAPI.getMoney(String name);// 为玩家对象设置指定金额
CoinAPI.setMoney(Player p, Integer amount);
// 为指定名称的玩家设置金额
CoinAPI.setMoney(String name, Integer amount);// 从玩家对象处移除指定金额
CoinAPI.removeMoney(Player p, Integer amount);
// 从指定名称的玩家处移除金额
CoinAPI.removeMoney(String name, Integer amount);// 为玩家对象增加指定金额
CoinAPI.addMoney(Player p, Integer amount);
// 为指定名称的玩家增加金额
CoinAPI.addMoney(String name, Integer amount);// 玩家 p 向玩家 t 支付指定金额
CoinAPI.payMoney(Player p, Player t, Integer amount);/coins [玩家名] - 查看自己或他人的货币余额。/coins <add/remove/set> [玩家名] <数量> - 增加、移除或设置货币数量。/pay <玩家名> <数量> - 向另一名玩家支付货币。CoinAPI.coins - 允许使用 /coins 命令。CoinAPI.other - 允许使用 /coins [玩家名] 查看他人余额。CoinAPI.edit.self - 允许使用 /coins <add/remove/set> <数量> 修改自己的货币。CoinAPI.edit.other - 允许使用 /coins <add/remove/set> <玩家名> <数量> 修改他人的货币。友情链接: 网易我的世界 | 泰拉瑞亚 | ocent云计算 | 米饭Minecraft插件文档 | 友链合作
历史访问人数:2,583,992 | 历史访问人次:3,135,256
今日访问人数:4,455 | 今日访问人次:4,877
昨日访问人数:24,332 | 昨日访问人次:29,698
Copyright © 2019-2026 我的世界服务器列表站. All rights reserved.
❤ Powered by GermMC 京ICP备17023959号-6