MC服务器承载人数计算器

MC服务器承载人数计算器-API使用说明

基础信息

该API用于计算Minecraft服务器的最大玩家承载量,基于服务器硬件配置、带宽和服务端类型等参数进行精确计算。

API端点: https://jzrxh.work/projects/mc-calc/api.php

请求方式: GET 或 POST

响应格式: JSON

字符编码: UTF-8

API版本: 1.0.0

请求参数

所有请求必须包含以下参数:

参数名

类型

必填

说明

示例值

serverType

string

服务器类型: physical(物理机) 或 virtual(虚拟机)

physical

osType

string

操作系统: linux 或 windows

linux

gameVersion

string

游戏版本: java, bedrock, crossplay, group

java

serverSoftware

string

服务端类型 (根据游戏版本选择)

Paper

cpuArch

string

CPU架构: standard(标准核心) 或 hybrid(混合架构/大小核)

standard

cpuCores

int

物理核心数(混合架构填性能核数量)

4

eCores

int

可选

能效核数量(小核),仅当cpuArch=hybrid时需要

4

cpuBase

float

CPU基础频率(GHz)

3.0

cpuBoost

float

CPU最大睿频(GHz)

4.2

ram

int

内存容量(GB)

8

upload

int

上行带宽(Mbps)

15

download

int

下行带宽(Mbps)

100

请求示例

GET请求

GET https://jzrxh.work/projects/mc-calc/api.php?serverType=physical&osType=linux&gameVersion=java

&serverSoftware=Paper&cpuArch=standard&cpuCores=4

&cpuBase=3.0&cpuBoost=4.2&ram=8&upload=15&download=100

POST请求 (JSON)

POST https://jzrxh.work/projects/mc-calc/api.php

Content-Type: application/json

{

"serverType": "physical",

"osType": "linux",

"gameVersion": "java",

"serverSoftware": "Paper",

"cpuArch": "standard",

"cpuCores": 4,

"eCores": 0,

"cpuBase": 3.0,

"cpuBoost": 4.2,

"ram": 8,

"upload": 15,

"download": 100

}

成功响应示例

{

"status": "success",

"api_version": "1.0.0",

"timestamp": "2023-11-15T12:30:45+00:00",

"data": {

"finalPlayers": 12,

"recommendedPlayers": 10,

"cpuPlayers": 18,

"ramPlayers": 51,

"bandwidthPlayers": 12,

"bottlenecks": ["带宽"],

"config": {

"serverType": "物理机",

"osType": "Linux",

"gameVersion": "Java版",

"serverSoftware": "Paper",

"cpuArch": "标准架构",

"cpuCores": 4,

"eCores": 0,

"cpuBase": 3.0,

"cpuBoost": 4.2,

"ram": 8,

"upload": 15,

"download": 100

},

"performanceFactors": {

"baseFactor": 1,

"osFactor": 1.15,

"softwareFactor": 0.88,

"leviLaminaBoost": 1,

"effectiveCores": 4,

"clockFactor": 0.857

},

"bandwidthDetails": {

"uploadLimit": 12,

"downloadLimit": 25,

"requirements": {

"upload": 200,

"download": 60

}

},

"suggestions": [

"升级上行带宽(当前15M↑)",

"启用网络压缩(如ViaVersion的压缩功能)",

"限制玩家视距以减少数据传输"

]

}

}

错误处理

错误响应示例

{

"status": "error",

"code": "MISSING_PARAM",

"message": "缺少必需参数: cpuCores",

"required_params": [

"serverType",

"osType",

"gameVersion",

"serverSoftware",

"cpuArch",

"cpuCores",

"cpuBase",

"cpuBoost",

"ram",

"upload",

"download"

]

}

错误代码说明

错误代码

说明

HTTP状态码

MISSING_PARAM

缺少必需参数

400 Bad Request

INVALID_VALUE

参数值无效

400 Bad Request

INVALID_GAME_VERSION

无效的游戏版本

400 Bad Request

INVALID_SERVER_SOFTWARE

无效的服务端类型

400 Bad Request

由 enderLuoxh 开发 | API版本 1.0.0 | 计算结果仅供参考

2026-02-26 07:19:45
靠写作每月多赚2000+,分享3个真正能变现的平台!写作如何赚钱?
怎么通过手机美图秀秀将图片进行九格切图处理