
ExAPI – Minecraft 服务器的安全 HTTP 桥接
ExAPI 由 ExStudios 开发,是一款适用于运行 Paper 1.19+(已在 1.21.5 上测试)的 Minecraft 服务器的生产级 API 桥接插件。
它允许 Discord 机器人、仪表盘和 AI 服务等外部应用通过可配置的 HTTP 端点安全地请求实时服务器数据。
✦ 主要功能
• 插件内嵌 HTTP 服务器
• 安全的 API 密钥认证(Bearer Token)
• config.yml 中完全可配置的端点
• 每个端点支持字段级数据开关
• 可选 Vault 经济系统支持
• 按 IP 限流
• 可选 IP 白名单
• 绑定到 localhost 以增强安全性
• 异步安全执行
• 清晰的架构与可扩展的代码库
• JSON 响应格式,便于集成
✦ 支持的端点
所有端点均可单独启用或禁用。
• /server – MOTD、版本、在线玩家数、最大玩家数
• /players – 在线玩家列表
• /player/{uuid} – 详细玩家信息
• /tps – 服务器 TPS
• /economy/{player} – 余额(需安装 Vault)
• /plugins – 已安装的插件
• /custom – 用户自定义数据
✦ 玩家数据选项
每个字段均可在配置文件中切换:
• 用户名
• UUID
• 生命值
• 饥饿值
• 位置
• 所在世界
• 游戏模式
• 延迟 (Ping)
• 权限
✦ 安全性
• 所有请求均需 API 密钥
• 限流机制
• 可选 IP 白名单
• 仅绑定 localhost
• 不阻塞主线程
专为公共仪表盘和机器人集成设计,无需暴露你的服务器。
✦ 示例用例
• 显示服务器状态的 Discord 机器人
• 带有实时玩家信息的 Web 仪表盘
• 读取服务器数据的 AI 管理助手
• 网络监控工具
• 移动应用服务器状态查询
✦ 示例请求
GET /server
Authorization: Bearer YOUR_API_KEY
响应:
{
"motd": "Welcome",
"version": "1.21.5",
"onlinePlayers": 12,
"maxPlayers": 100
}
✦ 要求
• Java 17+
• Paper / Spigot 1.19+
• 可选:Vault 用于经济功能
✦ 为什么选择 ExAPI?
大多数插件通过命令或不安全的 Socket 暴露数据。
ExAPI 提供了一个干净、安全、可配置的 HTTP API,专为实际集成而设计。

ExAPI – Secure HTTP Bridge for Minecraft Servers
ExAPI by ExStudios is a production-ready API bridge for Minecraft servers running Paper 1.19+ (tested on 1.21.5).
It allows external apps like Discord bots, dashboards, and AI services to securely request real-time server data through configurable HTTP endpoints.
✦ Key Features
• Embedded HTTP server inside the plugin
• Secure API key authentication (Bearer token)
• Fully configurable endpoints in config.yml
• Field-level data toggles per endpoint
• Optional Vault economy support
• Rate limiting per IP
• Optional IP whitelist
• Bind to localhost for extra security
• Async-safe execution
• Clean architecture & scalable codebase
• JSON responses for easy integration
✦ Supported Endpoints
All endpoints can be enabled or disabled individually.
• /server – MOTD, version, players, max players
• /players – Online player list
• /player/{uuid} – Detailed player info
• /tps – Server TPS
• /economy/{player} – Balance (if Vault installed)
• /plugins – Installed plugins
• /custom – User-defined data
✦ Player Data Options
Each field can be toggled in config:
• Username
• UUID
• Health
• Food
• Location
• World
• Gamemode
• Ping
• Permissions
✦ Security
• API key required for all requests
• Rate limiting
• Optional IP whitelist
• Localhost-only binding
• No main-thread blocking
Designed for public dashboards and bot integrations without exposing your server.
✦ Example Use Cases
• Discord bot showing server stats
• Web dashboard with live player info
• AI admin assistant reading server data
• Network monitoring tools
• Mobile app server status
✦ Example Request
GET /server
Authorization: Bearer YOUR_API_KEY
Response:
{
"motd": "Welcome",
"version": "1.21.5",
"onlinePlayers": 12,
"maxPlayers": 100
}
✦ Requirements
• Java 17+
• Paper / Spigot 1.19+
• Optional: Vault for economy
✦ Why ExAPI?
Most plugins expose data through commands or unsafe sockets.
ExAPI provides a clean, secure, configurable HTTP API designed for real integrations.
- Credits to serenestriker_ for giving the idea!
评论 0
登录后参与评分
还没有评论,来抢沙发吧