MCBE-Server-Motd

command module
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

README

Minecraft BedrockEdition Server Motd

我的世界服务器Motd协议封装和HTTP API实践

虽然叫"BedrockEdition Server Motd",但是也支持Java Server哦 : )

🛫 使用

官方部署站点

https://motdbe.blackbe.work/

API 文档

BlackBE Wiki

🛠️ 部署

#解压资源
unzip MCBE-Server-Motd_{{VERSION_OS_ARCH}}.zip

#赋予运行权限
chmod +x ./MCBE-Server-Motd

#启动
./MCBE-Server-Motd -port 8080

⚙️ 构建

自行构建前需要拥有 Go >= 1.22,yarn等必要依赖

克隆仓库

git clone https://github.com/BlackBEDevelopment/MCBE-Server-Motd.git --recurse-submodules

构建静态资源

#进入前端目录
cd ./fronend

#安装依赖
yarn install

#开始构建
yarn build

编译项目

#获取依赖包
go mod tidy

#开始编译
go build .

🎬 引入项目

安装
go get -u github.com/BlackBEDevelopment/MCBE-Server-Motd/MotdBEAPI
例子
package main

import (
	"fmt"

	"github.com/BlackBEDevelopment/MCBE-Server-Motd/MotdBEAPI"
)

func main() {
	Host := "nyan.xyz:19132"
	data, err := MotdBEAPI.MotdBE(Host)
	if err != nil {
		fmt.Println(err)
	}
	fmt.Println(data)
}

📖许可证

项目采用Mozilla Public License Version 2.0协议开源

二次修改源代码需要开源修改后的代码,对源代码修改之处需要提供说明文档

Documentation

Overview

* @Author: NyanCatda * @Date: 2022-06-20 13:12:12 * @LastEditTime: 2022-09-21 12:16:52 * @LastEditors: NyanCatda * @Description: 路由注册 * @FilePath: \MCBE-Server-Motd\Routers.go

* @Author: NyanCatda * @Date: 2021-12-05 22:27:13 * @LastEditTime: 2022-09-21 12:18:03 * @LastEditors: NyanCatda * @Description: * @FilePath: \MCBE-Server-Motd\main.go

Directories

Path Synopsis
MotdBEAPI module
* @Author: NyanCatda * @Date: 2021-12-26 21:23:59 * @LastEditTime: 2022-06-20 13:28:28 * @LastEditors: NyanCatda * @Description: 服务器状态图片生成 * @FilePath: \MCBE-Server-Motd\StatusImg\StatusImg.go
* @Author: NyanCatda * @Date: 2021-12-26 21:23:59 * @LastEditTime: 2022-06-20 13:28:28 * @LastEditors: NyanCatda * @Description: 服务器状态图片生成 * @FilePath: \MCBE-Server-Motd\StatusImg\StatusImg.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL