mc服务器状态监测接口

本文最后更新于:2025年2月11日 晚上

《我的世界》服务器状态监测接口

java服务器

请求地址

https://api.g-haoyu.top/mcs/java/<address>

参数

<address> java服务器地址

示例

GET

1
https://api.g-haoyu.top/mcs/java/192.168.1.8:25565
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
"during": 0.0040934085845947266,
"error": 0,
"latency": 3.270071931183338,
"raw": {
"description": {
"translate": "RLCraft"
},
"modinfo": {
"modList": [
{
"modid": "minecraft",
"version": "1.12.2"
},
{
"modid": "forge",
"version": "14.23.5.2860"
}
],
"type": "FML"
},
"players": {
"max": 5,
"online": 1,
"sample":[{"id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","name":"Haoyu"}]
},
"version": {
"name": "1.12.2",
"protocol": 340
}
},
"time": 1739278072.0446725
}

bedrock服务器

请求地址

https://api.g-haoyu.top/mcs/be/<address>

参数

<address> bedrock服务器地址

示例

GET

1
https://api.g-haoyu.top/mcs/be/192.168.1.8:25565
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"during": 0.25789380073547363,
"error": 0,
"latency": 257.6688111294061,
"raw": {
"description": {
"translate": "§o§e§lN§6G§r§7: §bWinter Update"
},
"gamemode": "Creative",
"map": "NetherGames",
"players": {
"max": 399,
"online": 394
},
"version": {
"brand": "MCPE",
"name": "1.21.50",
"protocol": 766
}
},
"time": 1739277323.5319088
}

请求失败

若请求失败,则返回如下错误信息

1
2
3
4
5
6
7
{
"during": 0.115983724594116,
"error": 1,
"error_msg": "[Errno -2] Name or service not known",
"raw": false,
"time": 1739278442.83122
}

mc服务器状态监测接口
https://g-haoyu.top/2025/02/11/mc服务器状态监测接口/
作者
Haoyu
发布于
2025年2月11日
更新于
2025年2月11日
许可协议