diff --git a/README.md b/README.md index bdc3003..35dd0d5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,22 @@ -# 我会永远视奸你们的👀 +# 一个服务器在线玩家时间以及服务器状态的简单的mod +[English](https://git.branulf.top/Branulf/ServerPlayerOnlineTracker/src/branch/master/README_EN.md) -一个监视服务器玩家在线时间的mod,带web服务器,目前并不完善 +### 包含功能: +* 显示/记录服务器在线玩家时间 +* 显示服务器状态 +* 显示服务器在线玩家列表 +* ~~移除游戏中的Herobrine~~ -*震惊!!!该mod的AI含量竟高达60%!!!* \ No newline at end of file +### 使用方法: +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`~~ \ No newline at end of file diff --git a/README_EN.md b/README_EN.md new file mode 100644 index 0000000..830977c --- /dev/null +++ b/README_EN.md @@ -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`~~ \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 9b61fe8..111ebc9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 10393d0..685d269 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -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": [