This commit is contained in:
BRanulf 2025-06-05 14:25:26 +08:00
parent 1ffa91a98a
commit 10f52e130e
4 changed files with 48 additions and 9 deletions

View File

@ -1,5 +1,22 @@
# 我会永远视奸你们的👀
# 一个服务器在线玩家时间以及服务器状态的简单的mod
[English](https://git.branulf.top/Branulf/ServerPlayerOnlineTracker/src/branch/master/README_EN.md)
一个监视服务器玩家在线时间的mod带web服务器目前并不完善
### 包含功能:
* 显示/记录服务器在线玩家时间
* 显示服务器状态
* 显示服务器在线玩家列表
* ~~移除游戏中的Herobrine~~
*震惊该mod的AI含量竟高达60%*
### 使用方法:
1. 安装Fabric Loader和Fabric API
2. 将最新版本的mod放入mods文件夹
3. 首次启动服务器自动生成配置文件
4. 修改Web服务器端口(默认60048),语言(目前仅支持zh_cn和en_us),自动保存时间(默认300秒)
### API获取数据
*(也许可以用于机器人?)*
* 获取服务器在线玩家列表【服务器IP+配置的端口】+`/api/online-players`
* 获取服务器状态【服务器IP+配置的端口】+`/api/server-status`
* 获取服务器在线玩家时间【服务器IP+配置的端口】+`/api/stats`
* 获取服务器在线玩家数量【服务器IP+配置的端口】+`/api/player-count`
* ~~原始数据文件【服务器IP+配置的端口】+`/api/playerdata`~~

22
README_EN.md Normal file
View File

@ -0,0 +1,22 @@
# A simple mod for online player time and server status
[中文简体](https://git.branulf.top/Branulf/ServerPlayerOnlineTracker/src/branch/master/README.md)
### Includes functions:
* Display /Record server online player time
* Display server status
* Show the server online player list
* ~~Remove Herobrine in the game~~
### How to use:
1. Install Fabric Loader and Fabric API
2. Put the latest version of mods into the mods folder
3. Automatically generate configuration files when starting the server for the first time
4. Modify the web server port (default 60048), language (currently only supports zh_cn and en_us), automatic save time (default 300 seconds)
### API to get data:
*(Maybe it can be used for robots?)*
* Get the online player list of servers: [Server IP+configured port] +`/api/online-players`
* Get server status: [Server IP+configured port] +`/api/server-status`
* Get the server online player time: [Server IP+configured port] +`/api/stats`
* Get the number of online players on the server: [Server IP+configured port] +`/api/player-count`
* ~~Raw data file: [Server IP+configured port] +`/api/playerdata`~~

View File

@ -6,9 +6,9 @@ minecraft_version=1.21.4
yarn_mappings=1.21.4+build.8
loader_version=0.16.10
# Mod Properties
mod_version=1.14.514.129
mod_version=1.14.514.130
maven_group=org.example1
archives_base_name=playerOnlineTimeTrackerMod
archives_base_name=ServerPlayerOnlineTracker
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.119.2+1.21.4

View File

@ -2,16 +2,16 @@
"schemaVersion": 1,
"id": "playertime",
"version": "${version}",
"name": "玩家在线时长统计Mod",
"description": "",
"name": "ServerPlayerOnlineTracker",
"description": "A simple server mod that can display some status information and online players. With web server.",
"authors": [
"BRanulf"
],
"contact": {
"homepage": "https://git.branulf.top/Branulf",
"sources": "https://git.branulf.top/Branulf/playerOnlineTimeWeb"
"sources": "https://git.branulf.top/Branulf/ServerPlayerOnlineTracker"
},
"license": "GPL",
"license": "GPL3",
"environment": "server",
"entrypoints": {
"main": [