Azrova's Economy - 本项目已不再由 Azrova 维护,您可以 Fork 该项目,但请务必注明原作者!
一款功能强大且丰富的 PaperMC/Bukkit 服务器经济插件,旨在提供基本的经济功能,并支持 Vault 和可选的 PlaceholderAPI 集成。
功能特性
- 基于 Vault 的核心经济系统: 利用 Vault 实现与其他经济相关插件的广泛兼容性。
- 玩家账户管理: 完整的用户账户创建、删除及访问控制系统。
- 用户访问控制: 管理员可以将用户从经济系统中移除,从而阻止其使用所有经济指令。
- 可配置的初始余额: 为新玩家设置初始金额。
- 每日奖励: 允许玩家领取可配置的每日奖励。
- 玩家间转账: 使用
/pay 指令进行金钱转移。
- 纸币系统: 使用
/withdraw 指令提取可兑换的物理纸币。
- 余额查询: 使用
/balance 指令查看自己或他人的余额(基于权限)。
- 富豪排行榜: 使用
/money top 指令显示前 N 名最富有的玩家。
- 分类化的管理员指令: 分别针对余额管理和用户管理的独立指令集。
- 完善的帮助系统: 通过
/eco help [topic] 在游戏内获取关于经济、管理员和用户管理指令的帮助。
- PlaceholderAPI 支持(可选): 通过
%azrovaseconomy_balance% 显示玩家余额。
- 可配置的货币符号: 在
config.yml 中自定义货币符号(例如 $, € 等)。
- SQLite 数据存储: 玩家数据使用 SQLite 本地保存,无需外部数据库设置。
依赖项
- Vault(必需): Azrova's Economy 依赖 Vault 来提供经济 API。未安装 Vault 时,此插件将无法运行。
- PlaceholderAPI(可选): 如果您希望在其他插件(如计分板、聊天栏)中使用诸如
%azrovaseconomy_balance% 这样的占位符,则必须安装 PlaceholderAPI。即使未安装该插件,Azrova's Economy 也能正常运行,但占位符将不可用。
安装指南
- 确保您的服务器正在运行 PaperMC 1.21.x 或兼容版本。
- 如果您尚未安装 Vault,请下载它。从 SpigotMC 下载并将其 JAR 文件放入服务器的
plugins 文件夹中。
- (可选)如果您打算使用占位符,请安装 PlaceholderAPI。从 SpigotMC 下载并将其 JAR 文件放入服务器的
plugins 文件夹中。
- 从 Releases Page 下载最新的
AzrovasEconomy.jar 版本。
- 将
AzrovasEconomy.jar 文件放入服务器的 plugins 文件夹中。
- 重启或重载您的服务器。
配置说明
插件首次运行时会在其插件文件夹中生成一个 config.yml 文件(路径:plugins/AzrovasEconomy/config.yml)。您可以修改以下设置:
starting-balance: 100.0
daily-reward-amount: 100.0
currency-symbol: "$"
daily-enabled: true
starting-balance: 玩家首次加入服务器并创建账户时获得的金额。
daily-reward-amount: 玩家使用 /daily 指令时获得的金额。
currency-symbol: 消息中金额前使用的符号(例如 "$100.00")。
daily-enabled: 是否启用每日奖励系统。设置为 false 将完全禁用 /daily 指令。
指令与权限
以下是指令列表及其关联的权限。default 下设置为 true 的权限默认对所有用户启用。设置为 op 的权限默认对服务器操作员启用。
玩家指令
| 指令 |
描述 |
权限 |
默认状态 |
/pay [user] [amount] |
向指定玩家支付一定金额的金钱。 |
azrova.economy.pay |
true |
/withdraw [amount] |
提取物理纸币形式的金钱。 |
azrova.economy.withdraw |
true |
/balance 或 /bal |
显示您当前的余额。 |
azrova.economy.balance |
true |
/balance [user] |
显示其他玩家的余额。 |
azrova.economy.balance.others |
op |
/money top |
显示最富有的玩家排行榜。 |
azrova.economy.money.top |
true |
/daily |
领取您的每日奖励。 |
azrova.economy.daily |
true |
管理员指令
帮助系统
| 指令 |
描述 |
权限 |
默认状态 |
/eco help |
显示可用的帮助主题。 |
azrova.admin |
op |
/eco help economy |
显示通用经济指令的帮助。 |
azrova.admin |
op |
/eco help admin |
显示管理员余额指令的帮助。 |
azrova.admin |
op |
/eco help user |
显示用户管理指令的帮助。 |
azrova.admin |
op |
余额管理(旧版 /eco 命令)
| 命令 |
描述 |
权限 |
默认值 |
/eco set [user] [amount] |
设置用户的余额。 |
azrova.admin.set |
op |
/eco remove [user] [amount] |
从用户处扣除金钱。 |
azrova.admin.remove |
op |
/eco delete [user] |
删除用户经济账户。 |
azrova.admin.delete |
op |
余额管理(新版 /eco admin 命令)
| 命令 |
描述 |
权限 |
默认值 |
/eco admin set [user] [amount] |
设置用户的余额。 |
azrova.admin.set |
op |
/eco admin add [user] [amount] |
向用户余额中添加金钱。 |
azrova.admin.add |
op |
/eco admin remove [user] [amount] |
从用户处扣除金钱。 |
azrova.admin.remove |
op |
/eco admin delete [user] |
删除用户经济账户。 |
azrova.admin.delete |
op |
用户管理
| 命令 |
描述 |
权限 |
默认值 |
/eco user create [username] |
为用户创建经济账户。 |
eco.admin.user.create |
op |
/eco user remove [username] |
移除用户的经济账户。 |
eco.admin.user.remove |
op |
基础管理员权限
| 权限 |
描述 |
默认值 |
azrova.admin |
所有管理员命令的基础权限。 |
op |
用户访问控制
Azrova's Economy 包含一个全面的用户访问控制系统:
账户管理
- 账户创建: 管理员可以使用
/eco user create [username] 为用户创建经济账户
- 账户移除: 管理员可以使用
/eco user remove [username] 将用户从经济系统中移除
- 访问限制: 被移除的用户无法使用任何经济命令,直到其账户被重新创建
已移除用户的行为
当用户的经济账户被移除时:
- 所有经济命令(
/balance, /pay, /withdraw, /daily)将失败并显示清晰的错误消息
- 用户会收到消息:“您没有经济账户。请联系管理员。”
- 不会自动重新创建账户——必须由管理员手动重新创建
- 其他玩家无法向已移除账户的用户转账
账户重新创建
- 已移除的用户可以使用
/eco user create [username] 重新创建其账户
- 新账户以配置的起始余额开始
- 账户重新创建后,所有经济功能恢复可用
帮助系统
该插件提供全面的内置游戏内帮助系统,可通过 /eco help 访问:
/eco help - 显示所有可用的帮助主题
/eco help economy - 列出所有玩家经济命令
/eco help admin - 列出所有管理员余额管理命令
/eco help user - 列出所有用户管理命令及使用说明
占位符 (PlaceholderAPI)
如果安装了 PlaceholderAPI,则可使用以下占位符:
%azrovaseconomy_balance%: 显示玩家的当前余额,格式化为配置好的货币符号。
- 示例:
You have: %azrovaseconomy_balance% 可能显示为 You have: $150.50
- 对于没有经济账户的用户返回
$0.00
从源码构建
如果您希望从源码构建该插件:
- 克隆仓库:
git clone https://github.com/Azrova/AzrovasEconomy.git
- 进入项目目录:
cd AzrovasEconomy
- 确保已安装并配置 Java 21(或
build.gradle.kts 中指定的版本)。
- 运行 Gradle 构建命令:
- Windows:
.\gradlew build
- Linux/macOS:
./gradlew build
- 编译后的 JAR 文件位于
build/libs/ 目录中。
作者与支持
- 作者: CNethuka, Sobble
- 支持与错误报告: 请在 GitHub 上使用 Issues Page。
- 项目仓库:
由 CNethuka 和 Sobble 用 ❤️ 制作
Azrova's Economy - This project is no longer managed by Azrova, you can fork but please make sure to give us credits!
A robust and feature-rich economy plugin for PaperMC/Bukkit servers, designed to provide essential economic functionalities with support for Vault and optional PlaceholderAPI integration.
Features
- Core Economy via Vault: Leverages Vault for broad compatibility with other economy-related plugins.
- Player Account Management: Complete user account creation, removal, and access control system.
- User Access Control: Administrators can remove users from the economy system, preventing access to all economy commands.
- Configurable Starting Balance: Set a starting amount for new players.
- Daily Rewards: Allow players to claim a configurable daily reward.
- Player-to-Player Payments:
/pay command for transferring money.
- Banknotes:
/withdraw command to create physical banknotes that can be redeemed.
- Balance Checking:
/balance command for players to check their own or others' balances (permission-based).
- Richest Players List:
/money top command to display the top N richest players.
- Organized Admin Commands: Separate command sets for balance management and user management.
- Comprehensive Help System: In-game help via
/eco help [topic] for economy, admin, and user management commands.
- PlaceholderAPI Support (Optional): Display player balances via
%azrovaseconomy_balance%.
- Configurable Currency Symbol: Customize the currency symbol (e.g., $, €, etc.) in
config.yml.
- SQLite Data Storage: Player data is saved locally using SQLite, requiring no external database setup.
Dependencies
- Vault (Required): Azrova's Economy relies on Vault to provide the economy API. This plugin will not function without Vault installed.
- PlaceholderAPI (Optional): If you wish to use placeholders like
%azrovaseconomy_balance% in other plugins (e.g., scoreboards, chat), PlaceholderAPI must be installed. The plugin will function normally without it, but placeholders will not be available.
Installation
- Ensure your server is running PaperMC 1.21.x or a compatible version.
- Install Vault if you haven't already. Download it from SpigotMC and place the JAR file in your server's
plugins folder.
- (Optional) Install PlaceholderAPI if you intend to use placeholders. Download it from SpigotMC and place the JAR file in your server's
plugins folder.
- Download the latest release of
AzrovasEconomy.jar from the Releases Page.
- Place the
AzrovasEconomy.jar file into your server's plugins folder.
- Restart or reload your server.
Configuration
The plugin will generate a config.yml file in its plugin folder (plugins/AzrovasEconomy/config.yml) upon first run. You can modify these settings:
starting-balance: 100.0
daily-reward-amount: 100.0
currency-symbol: "$"
daily-enabled: true
starting-balance: The amount of money a player receives when they join the server for the first time and an account is created for them.
daily-reward-amount: The amount of money a player receives when they use the /daily command.
currency-symbol: The symbol used before amounts in messages (e.g., "$100.00").
daily-enabled: Whether the daily reward system is enabled. Set to false to disable the /daily command entirely.
Commands & Permissions
Below is a list of commands and their associated permissions. Permissions set to true under default are enabled for all users by default. Permissions set to op are enabled for server operators by default.
Player Commands
| Command |
Description |
Permission |
Default |
/pay [user] [amount] |
Pay a user an amount of money. |
azrova.economy.pay |
true |
/withdraw [amount] |
Withdraw money as a physical banknote. |
azrova.economy.withdraw |
true |
/balance or /bal |
Shows your current balance. |
azrova.economy.balance |
true |
/balance [user] |
Shows another user's balance. |
azrova.economy.balance.others |
op |
/money top |
Shows the top richest players. |
azrova.economy.money.top |
true |
/daily |
Claim your daily reward. |
azrova.economy.daily |
true |
Admin Commands
Help System
| Command |
Description |
Permission |
Default |
/eco help |
Shows available help topics. |
azrova.admin |
op |
/eco help economy |
Shows general economy commands help. |
azrova.admin |
op |
/eco help admin |
Shows admin balance commands help. |
azrova.admin |
op |
/eco help user |
Shows user management commands help. |
azrova.admin |
op |
Balance Management (Legacy /eco commands)
| Command |
Description |
Permission |
Default |
/eco set [user] [amount] |
Set a user's balance. |
azrova.admin.set |
op |
/eco remove [user] [amount] |
Remove money from a user. |
azrova.admin.remove |
op |
/eco delete [user] |
Delete a user's economy account. |
azrova.admin.delete |
op |
Balance Management (New /eco admin commands)
| Command |
Description |
Permission |
Default |
/eco admin set [user] [amount] |
Set a user's balance. |
azrova.admin.set |
op |
/eco admin add [user] [amount] |
Add money to a user's balance. |
azrova.admin.add |
op |
/eco admin remove [user] [amount] |
Remove money from a user. |
azrova.admin.remove |
op |
/eco admin delete [user] |
Delete a user's economy account. |
azrova.admin.delete |
op |
User Management
| Command |
Description |
Permission |
Default |
/eco user create [username] |
Create an economy account for a user. |
eco.admin.user.create |
op |
/eco user remove [username] |
Remove a user's economy account. |
eco.admin.user.remove |
op |
Base Admin Permission
| Permission |
Description |
Default |
azrova.admin |
Base permission for all admin commands. |
op |
User Access Control
Azrova's Economy includes a comprehensive user access control system:
Account Management
- Account Creation: Administrators can create economy accounts for users with
/eco user create [username]
- Account Removal: Administrators can remove users from the economy system with
/eco user remove [username]
- Access Prevention: Removed users cannot use any economy commands until their account is recreated
Removed User Behavior
When a user's economy account is removed:
- All economy commands (
/balance, /pay, /withdraw, /daily) will fail with a clear error message
- The user receives the message: "You do not have an economy account. Contact an administrator."
- No automatic account recreation occurs - accounts must be manually recreated by administrators
- Other players cannot pay money to removed users
Account Recreation
- Removed users can have their accounts recreated using
/eco user create [username]
- New accounts start with the configured starting balance
- All economy functionality is restored upon account recreation
Help System
The plugin features a comprehensive in-game help system accessible through /eco help:
/eco help - Shows all available help topics
/eco help economy - Lists all player economy commands
/eco help admin - Lists all admin balance management commands
/eco help user - Lists all user management commands with usage notes
Placeholders (PlaceholderAPI)
If PlaceholderAPI is installed, the following placeholder is available:
%azrovaseconomy_balance%: Displays the player's current balance, formatted with the configured currency symbol.
- Example:
You have: %azrovaseconomy_balance% might display as You have: $150.50
- Returns
$0.00 for users without economy accounts
Building from Source
If you wish to build the plugin from source:
- Clone the repository:
git clone https://github.com/Azrova/AzrovasEconomy.git
- Navigate to the project directory:
cd AzrovasEconomy
- Ensure you have Java 21 (or the version specified in
build.gradle.kts) installed and configured.
- Run the Gradle build command:
- On Windows:
.\gradlew build
- On Linux/macOS:
./gradlew build
- The compiled JAR file will be located in
build/libs/.
Authors & Support
- Authors: CNethuka, Sobble
- Support & Bug Reports: Please use the Issues Page on GitHub.
- Project Repository:
Made with ❤ by CNethuka and Sobble
评论 0
登录后参与评分
还没有评论,来抢沙发吧