
功能特性
- 用于管理游戏内货币(钻石)的经济系统。
- 存入和取出钻石。
- 向其他玩家发送钻石。
- 查看当前余额。
- 查看顶级玩家排行榜。
- 支持 MiniMessage 格式
- 支持 PlaceholderAPI
服务器兼容性
- Paper / Folia 及其所有分支。
- ⚠️ Spigot: 未经测试。
- ⚠️ Bukkit: 未经测试。
数据库存储
Hyeconomy 使用 MariaDB 进行数据库存储。这确保了玩家余额和交易数据的可靠且高效的存储。
命令
玩家命令
/balance: 查看您当前的余额。
/balance <player>: 查看其他玩家的当前余额。
/deposit <amount>: 将钻石存入您的账户。
/withdraw <amount>: 从您的账户中提取钻石。
/send <player> <amount>: 向另一名玩家发送钻石。
/top: 查看顶级玩家排行榜。
管理员命令
/dgive <player> <amount>: 给玩家账户添加余额。
/dtake <player> <amount>: 从玩家账户扣除余额。
/dset <player> <amount>: 设置玩家余额为特定值。
/dreset <player>: 将特定玩家的余额重置为 0。
/dreload: 重载配置和消息文件。
权限
hyeconomy.balance: 使用 /balance 命令的权限。
hyeconomy.balance.other: 使用 /balance 命令查看他人余额的权限。
hyeconomy.deposit: 使用 /deposit 命令的权限。
hyeconomy.withdraw: 使用 /withdraw 命令的权限。
hyeconomy.send: 使用 /send 命令的权限。
hyeconomy.top: 使用 /top 命令的权限。
hyeconomy.give: 使用 /dgive 命令的权限。
hyeconomy.take: 使用 /dtake 命令的权限。
hyeconomy.set: 使用 /dset 命令的权限。
hyeconomy.reset: 使用 /dreset 命令的权限。
hyeconomy.reload: 使用 /dreload 命令的权限。
配置
您可以通过编辑插件文件夹中的 config.yml 和 messages.yml 文件来自定义插件的各种方面,包括消息和数据库设置。
PlaceholderAPI 集成
安装 placeholderapi
- 显示玩家的余额
%hyeconomy_balance%。
- 按名称显示特定玩家的余额,使用
%hyeconomy_balance_PLAYERNAME%(将 PLAYERNAME 替换为实际的玩家名称)。
- 显示前 10 名玩家的用户名余额,使用
%hyeconomy_balance_top_username_1%, %hyeconomy_balance_top_username_2%,依此类推,直到 %hyeconomy_balance_top_username_10%。
- 显示前 10 名玩家的金额余额,使用
%hyeconomy_balance_top_amount_1%, %hyeconomy_balance_top_amount_2%,依此类推,直到 %hyeconomy_balance_top_amount_10%。
请记住在第二种类型的占位符中,将 PLAYERNAME 替换为您要查询的实际玩家名称。
支持
如果您遇到任何问题或有疑问,请随时在 GitHub 仓库上提交 issue。
许可证
本插件是开源的,并根据 MIT License 提供。
开发者 API 
信息
Apache Maven pom.xml
<repository>
<id>hyeconomy</id>
<url>https://repo.hynse.xyz/repository/maven-releases/</url>
</repository>
<dependency>
<groupId>xyz.hynse</groupId>
<artifactId>api-hyeconomy</artifactId>
<version>1.2-SNAPSHOT-1</version>
</dependency>
Gradle Groovy DSL build.gradle
repositories {
maven { url = "https://repo.hynse.xyz/repository/maven-releases/"}
}
dependencies {
compileOnly 'xyz.hynse:api-hyeconomy:1.2-SNAPSHOT-1'
}
示例
import xyz.hynse.hyeconomy.API.HyeconomyAPI;
// 当您需要获取或设置玩家余额时:
HyeconomyAPI hyeconomyAPI = Hyeconomy.getAPI();
// 通过 UUID 获取玩家余额
UUID playerUUID = /* 玩家的 UUID */;
int balance = hyeconomyAPI.getPlayerBalance(playerUUID);
// 通过 UUID 设置玩家余额
int newBalance = /* 新的余额 */;
hyeconomyAPI.setPlayerBalance(playerUUID, newBalance);
int amount = /* 要增加或减少的金额 */;
// 通过 UUID 增加玩家余额
HyeconomyAPI.addToPlayerBalance(UUID playerUUID, amount)
// 通过 UUID 减少玩家余额
HyeconomyAPI.subtractFromPlayerBalance(UUID playerUUID, amount)

Features
- Economy system for managing in-game currency (diamonds).
- Deposit and withdraw diamonds.
- Send diamonds to other players.
- Check your current balance.
- View a leaderboard of top players.
- Support MiniMessage format
- PlaceholderAPI supported
Server Compatibility
- Paper / Folia and any forks.
- ⚠️ Spigot: untested.
- ⚠️ ฺBukkit: untested.
Database Storage
Hyeconomy utilizes MariaDB for database storage. This ensures reliable and efficient data storage for player balances and transactions.
Commands
Player Command
/balance: Check your current balance.
/balance <player>: Check other current balance.
/deposit <amount>: Deposit diamonds into your account.
/withdraw <amount>: Withdraw diamonds from your account.
/send <player> <amount>: Send diamonds to another player.
/top: View the leaderboard of top players.
Admin Command
/dgive <player> <amount>: Give balance to player account.
/dtake <player> <amount>: Take balance from player account.
/dset <player> <amount>: Set player balance specific value.
/dreset <player>: Reset specific player balance to 0.
/dreload: Reload config and message.
Permissions
hyeconomy.balance: Permission to use the /balance command.
hyeconomy.balance.other: Permission to use the /balance command check other.
hyeconomy.deposit: Permission to use the /deposit command.
hyeconomy.withdraw: Permission to use the /withdraw command.
hyeconomy.send: Permission to use the /send command.
hyeconomy.top: Permission to use the /top command.
hyeconomy.give: Permission to use the /dgive command.
hyeconomy.take: Permission to use the /dtake command.
hyeconomy.set: Permission to use the /dset command.
hyeconomy.reset: Permission to use the /dreset command.
hyeconomy.reload: Permission to use the /dreload command.
Configuration
You can customize various aspects of the plugin, including messages and database settings, by editing the config.yml and messages.yml files in the plugin's folder.
PlaceholderAPI Integration
install placeholderapi
- display a player's balance
%hyeconomy_balance%.
- display a specific player's balance by name, use
%hyeconomy_balance_PLAYERNAME% (replace PLAYERNAME with the actual player's name).
- display the username balance of the top 10 players, use
%hyeconomy_balance_top_username_1%, %hyeconomy_balance_top_username_2%, and so on, up to %hyeconomy_balance_top_username_10%.
- display the amount balance of the top 10 players, use
%hyeconomy_balance_top_amount_1%, %hyeconomy_balance_top_amount_2%, and so on, up to %hyeconomy_balance_top_amount_10%.
Remember to replace PLAYERNAME with the actual player name you want to query in the second type of placeholder.
Support
If you encounter any issues or have questions, please feel free to open an issue on the GitHub repository.
License
This plugin is open-source and available under the MIT License.
Developer API 
Information
Apache Maven pom.xml
<repository>
<id>hyeconomy</id>
<url>https://repo.hynse.xyz/repository/maven-releases/</url>
</repository>
<dependency>
<groupId>xyz.hynse</groupId>
<artifactId>api-hyeconomy</artifactId>
<version>1.2-SNAPSHOT-1</version>
</dependency>
Gradle Groovy DSL build.gradle
repositories {
maven { url = "https://repo.hynse.xyz/repository/maven-releases/"}
}
dependencies {
compileOnly 'xyz.hynse:api-hyeconomy:1.2-SNAPSHOT-1'
}
Example
import xyz.hynse.hyeconomy.API.HyeconomyAPI;
// when you need to get or set player balances:
HyeconomyAPI hyeconomyAPI = Hyeconomy.getAPI();
// Get a player's balance by UUID
UUID playerUUID = /* UUID of the player */;
int balance = hyeconomyAPI.getPlayerBalance(playerUUID);
// Set a player's balance by UUID
int newBalance = /* The new balance */;
hyeconomyAPI.setPlayerBalance(playerUUID, newBalance);
int amount = /*Amount want to add or subtract*/;
// Add a player's balance by UUID
HyeconomyAPI.addToPlayerBalance(UUID playerUUID, amount)
// subtract a player's balance by UUID
HyeconomyAPI.subtractFromPlayerBalance(UUID playerUUID, amount)
评论 0
登录后参与评分
还没有评论,来抢沙发吧