SG Economy API
概述
SG Economy API 为 Minecraft 添加了一个灵活、现代且可扩展的经济系统。它作为 Mod API 运行,允许玩家、整合包创作者、开发者和服务端管理员以简单一致的方式创建和集成自定义经济系统。
该经济系统基于与玩家数据直接关联的 持久性数值余额。此余额 不以游戏内物品形式表示,而是作为一个“虚拟钱包”存在,其名称、含义和用途可能因具体实现或与其他模组的集成而异。
主要特性
? 灵活的货币系统
允许配置使用 整数 或 小数 值,使经济系统适应不同的用例(如简单货币、带分币的系统等)。配置通过文件完成,并直接影响存储余额的格式。
? 开发者 API
提供文档化的类和方法,用于:
- 查询和修改玩家余额
- 与其他模组进行原生集成
- 创建自定义经济系统
GitHub 仓库中包含实用示例和实施指南。
?️ 管理命令
包含用于游戏内经济管理的管理命令,支持:
- 查看余额
- 添加、设置或移除数值
- 在玩家之间转移余额(可选)
这些命令可根据服务器需求启用或禁用。
?️ 显示界面
以可视化和可配置的方式在物品栏界面和/或屏幕上显示玩家的經濟余额。显示内容仅反映 存储在玩家数据中的数值,与实际物品无关。
⚙️ 配置文件
配置文件允许自定义经济系统的行为,包括货币格式、余额保留规则、可用命令以及界面显示选项。
SG Economy API
Overview
SG Economy API adds a flexible, modern, and extensible economic system to Minecraft. It works as a Mod API, allowing players, modpack creators, developers, and server administrators to create and integrate custom economies in a simple and consistent way.
The economic system is based on a persistent numeric balance, directly associated with player data. This balance is not represented by in-game items, functioning as a “virtual wallet” whose name, meaning, and usage may vary depending on the implementation or integration with other mods.
Key Features
? Flexible Monetary System
Allows configuration to use integer or decimal values, adapting the economy to different use cases (simple currencies, systems with cents, etc.). The configuration is done via a file and directly affects the format of the stored balance.
? Developer API
Provides documented classes and methods for:
- Querying and modifying player balances
- Native integration with other mods
- Creating custom economic systems
The GitHub repository includes practical examples and implementation guides.
?️ Administrative Commands
Includes commands for in-game economy management, allowing:
- Balance checks
- Adding, setting, or removing values
- Transferring balance between players (optional)
These commands can be enabled or disabled according to server needs.
?️ Display Interface
Displays the player’s economic balance in the inventory interface and/or on-screen, in a visual and configurable way. The display reflects only the value stored in the player’s data, with no relation to physical items.
⚙️ Configuration Files
Configuration files allow customization of the economic system’s behavior, including currency format, balance retention rules, available commands, and interface display options.
评论 0
登录后参与评分
还没有评论,来抢沙发吧