menu 湮灭API-为开发者提供的API API接口列表
湮灭API
home
首页
info_outline
关于
link
友情链接
后台登录

加载中......


湮灭API

为开发者提供的API

湮灭网络工作室

mcCron
mc连接cron并返回命令结果
接口说明
short_text 请求说明

请求地址:
https://api.ymypay.cn/API/mcrcon
返回格式:
json
请求方式:
post/get

short_text 返回示例
								
{
  "code": 200,
  "msg": "连接成功",
  "data": {
    "msg": "There are 0 of a max 20 players online:",
    "time": 1671883699
  }
}
								
							
short_text 请求参数
参数名称 参数类型 是否必填 备注内容
host string mc的ip或地址
port int mc的cron端口
password string mc的cron密码
command string 需要执行的命令

short_text 返回代码
名称 说明
100 连接失败
200 连接成功
199875 api不存在
199999 api维护中
PHP代码示例
							

							
						
short_text 返回参数
参数名称 参数类型 备注内容
code int 状态码
msg string 连接信息:连接成功/连接失败
data.msg string 失败原因/命令返回结果
data.time int 命令执行的时间
expand_less