
在网页上查看记分板、PlaceholderAPI 占位符及其他插件的统计数据!
功能
- 多数据源: WebStats 可以整合以下来源的统计数据:
- 记分板(Scoreboard) 目标
- 占位符(Placeholders)(需要 PlaceholderAPI)
- MySQL 数据库: 通过可自定义的配置,你可以从任何插件收集统计数据
- Discord 集成: 你可以将 WebStats 作为 webhook 添加到你的 Discord 服务器。
- SkinsRestorer 集成: 当存在 SkinsRestorer 时,WebStats 会显示来自 SkinsRestorer 的玩家头像(也适用于离线模式和 Bedrock 玩家)。
- 玩家头像显示: 该插件使用 mc-heads.net 提供的服务,自动在名称旁边显示玩家头像。
- 目标排序: 点击列标题即可按该目标排序。再次点击可反转排序方向。
- 自动数据更新: 默认情况下,WebStats 每 10 秒刷新一次数据,但这可以在配置中更改,也可以禁用。
- 在线 / AFK 状态: 当存在 EssentialsX 时,WebStats 会使用它来标记处于空闲状态(AFK)的玩家。否则,你仍然可以看到谁是在线玩家。
- 在线玩家筛选: 如果玩家数量众多,你可以仅筛选并显示在线玩家。
- 分页: 为了网页性能,默认最多显示 100 名玩家,并提供上一页/下一页控件。
- 目标筛选: 在配置文件中,你可以筛选哪些记分板目标应在网页上可见。默认情况下,筛选器仅包含
'*',这意味着所有目标。
- 自定义列顺序: 默认情况下,列按字母顺序显示。你可以设置自己的顺序并选择要显示的列。
- 统计数据导出: 将统计数据保存为
.csv 文件,以便制作漂亮的图表。
安装
有两种方式使用 WebStats:使用你自己的服务器(可定制性更强)或使用内置服务器(更简单)。下载包中包含插件 jar 文件和一个 javascript 文件;只有在使用自己的 Web 服务器时才需要该 javascript 文件。
对于这两种方法,你都需要在 Minecraft 服务器上开放一个端口,以便插件进行通信。确保更改 config.yml 中的端口号(以及在使用自己的服务器时初始化 Web 客户端时的端口号)。
使用内置 Web 服务器
将配置文件中的 serve-webpage 设置为 true 并重启。就这样。
使用自己的 Web 服务器
从 zip 文件中复制 Javascript 文件并将其作为 Javascript 模块导入。你还需要在页面加载时初始化 WebStats,更多信息和示例请参见 Github。
有关配置文件的更多信息,请参阅 Github wiki。其中还有一些页面提供某些功能的更详细信息。
更多信息
我创建了一个带有虚拟数据的简单演示页面供你试用:demo
如需更深入的信息,请参阅 Github wiki。
如果你需要帮助,或提交错误报告、反馈和建议,请在 上打开一个问题,或在 Spigotmc 论坛帖子 中发帖。

View statistics from the scoreboard, PlaceholderAPI placeholders and other plugins in a web page!
Features
- Multiple sources: WebStats can combine statistics from these sources:
- Scoreboard objectives
- Placeholders (requires PlaceholderAPI)
- MySQL database: with a customisable configuration, you can gather statistics from any plugin
- Discord integration: You can add WebStats as a webhook to your Discord server.
- SkinsRestorer integration: When present, WebStats will display player heads from SkinsRestorer (also for offline-mode and bedrock players).
- Player head display: The plugin uses the service provided by mc-heads.net to automatically display player heads next to the names.
- Objective sorting: Click on the column headers to sort on that objective. Clicking again reverses the sort.
- Automatic data updates: By default, WebStats refreshes the data every 10 seconds, though this is configurable and can also be disabled.
- Online / AFK status: When EssentialsX is present, WebStats uses it to mark AFK players. Otherwise, you will still be able to see who is online.
- Online player filter: You can filter to only display online players for if you have many players.
- Pagination: For webpage performance, max 100 players are displayed by default with next/previous page controls.
- Objective filtering: In the config file, you can filter which scoreboard objectives should be visible on the webpage. By default, the filter only contains
'*', which means all objectives.
- Custom column order: By default, columns are displayed in alphabetical order. You can set your own order and select which columns should be shown.
- Statistics export: Save the statistics in a
.csv file so you can make nice graphs.
Installation
There are two ways to use WebStats: with your own server (more customisable) or with an integrated server (easier). The download contains the plugin jar plus a javascript file, you only need the javascript file for when you are using your own webserver.
For both methods, you need to open a port on the Minecraft server for the plugin to communicate over. Make sure to change the port number in config.yml (and in the web client initialisation when using your own server).
Using integrated web server
Set serve-webpage in the config file to true and restart. That's it.
Using own web server
Copy the Javascript file from the zip file and import it as a Javascript module. You also need to initialise WebStats when the page loads, more detailed information and an example are present on Github.
Please refer to the Github wiki for more information about the configuration file. It also has pages with more detailed information for some features.
More info
I have made a simple demo page with dummy data for you to try out: demo
For more in-depth information, please see the Github wiki.
If you need help, or for bug reports, feedback and suggestions, please open an issue on , or post in the Spigotmc forum thread.
评论 0
登录后参与评分
还没有评论,来抢沙发吧