MCCMS:嵌入式 Web 排行榜与实时服务器监控
MCCMS 是一款极其轻量、速度惊人的 PaperMC 插件,它将原生 Web 服务器直接嵌入到您的 Minecraft 服务器中。
无需任何沉重的依赖或臃肿的外部数据库,它提供一个美观的实时仪表板,展示服务器的性能指标和实时的玩家生命值排行榜!
功能特性
- 内置 HTTP 服务器: 完全基于 Java 原生 Web 服务器运行。无需 Apache、Nginx 或外部数据库!
- 支持 Lifesteal 与 SMP: 排行榜会根据玩家的**最大生命值(Max Health)**自动进行排名,使其成为 Lifesteal 服务器的绝佳排行榜选择。在普通服务器中,它会回退到当前生命值进行排名!
- 实时动态监控: 仪表板每隔几秒更新一次,向您展示实时的服务器 TPS、内存使用情况(已分配 vs 已使用)以及在线玩家数量。
- 通用兼容性: 针对稳定 API 编译,这意味着单个
.jar 文件可以在 1.20.1、1.20.4、1.20.6、1.21 及更高版本上完美运行!
100% 可自定义的 Web 面板
我们知道每个服务器都是独一无二的,因此我们没有将网站设计锁定在插件内部。
首次运行 MCCMS 时,它会自动将原始的 index.html、styles.css、app.js 以及自定义指南提取到您的 plugins/MCCMS/web/ 文件夹中!
- 即时编辑: 您可以打开 HTML/CSS 文件,更改颜色、翻译文本或添加您的服务器 Logo。
- 无需重启: 保存文件,刷新浏览器,更改立即生效!无需重新加载插件或重启 Minecraft 服务器。
⚙配置
插件还会生成一个 config.yml 文件,您可以在其中设置 Web 服务器运行的端口(默认为 8080)。
面向开发者的 API 端点
如果您想构建自己的自定义工具,MCCMS 提供了两个极速的原始 JSON 端点:
GET /api/stats:返回实时的 TPS、内存和玩家数量。
GET /api/leaderboard:返回所有在线玩家的排序数组,包括他们的 UUID、当前生命值和最大生命值。
将其放入您的 plugins 文件夹,重启后访问 http://localhost:8080 即可查看您的新仪表板!
源代码
- MCCMS 是开源软件,采用 Apache License 2.0 许可证
来源:
致谢
MCCMS: Embedded Web Leaderboard & Live Server Monitor
MCCMS is an incredibly lightweight, blazing-fast PaperMC plugin that embeds a native web server directly into your Minecraft server.
With zero heavy dependencies or bloated external databases, it serves a beautiful, real-time dashboard displaying your server's performance metrics and a live player health leaderboard!
Features
- Built-in HTTP Server: Runs entirely on Java's native web server. No need for Apache, Nginx, or external databases!
- Lifesteal & SMP Ready: The leaderboard automatically ranks players by who has the highest Max Health, making it the absolute perfect leaderboard for Lifesteal servers. On normal servers, it automatically falls back to current health!
- Real-Time Live Monitor: The dashboard updates every few seconds to show you live Server TPS, RAM Usage (Allocated vs Used), and the Online Player count.
- Universal Compatibility: Compiled against a stable API, meaning a single
.jar file works flawlessly on 1.20.1, 1.20.4, 1.20.6, 1.21, and beyond!
100% Customizable Web Panel
We know every server is unique, so we didn't lock the website design inside the plugin.
When you run MCCMS for the first time, it automatically extracts the raw index.html, styles.css, app.js, and a customization guide directly into your plugins/MCCMS/web/ folder!
- Edit on the fly: You can open the HTML/CSS files, change colors, translate text, or add your server logo.
- No Restarts Needed: Save the file, refresh your browser, and your changes appear instantly! No need to reload the plugin or restart your Minecraft server.
⚙Configuration
The plugin also generates a config.yml where you can set the port the web server runs on (default is 8080).
API Endpoints for Developers
If you want to build your own custom tools, MCCMS exposes two blazing-fast, raw JSON endpoints:
GET /api/stats: Returns live TPS, Memory, and Player counts.
GET /api/leaderboard: Returns a sorted array of all online players, their UUIDs, current health, and max health.
Drop it into your plugins folder, restart, and head to http://localhost:8080 to see your new dashboard!
Source code
- MCCMS is open-source software Licensed under Apache License 2.0
Sources:
Credits
评论 0
登录后参与评分
还没有评论,来抢沙发吧