All Projects → SomeBottle → CloudMinecraft

SomeBottle / CloudMinecraft

Licence: MIT license
Create a minecraft server with TencentCloud API when the worlds are saved in another Student's Cloud.

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to CloudMinecraft

Pocketmine Mp
A server software for Minecraft: Bedrock Edition in PHP
Stars: ✭ 2,594 (+23481.82%)
Mutual labels:  minecraft-server
RaspberryPiMinecraft
Configuration files and performance testing scripts to setup and optimize a dedicated Minecraft (PC Java version) server
Stars: ✭ 179 (+1527.27%)
Mutual labels:  minecraft-server
js
serverless your express/koa/restify apps
Stars: ✭ 21 (+90.91%)
Mutual labels:  tencent-cloud
Docker Minecraft Server
Docker image that provides a Minecraft Server that will automatically download selected version at startup
Stars: ✭ 3,642 (+33009.09%)
Mutual labels:  minecraft-server
lazymc
💤 Put your Minecraft server to rest when idle.
Stars: ✭ 330 (+2900%)
Mutual labels:  minecraft-server
Origami
Bukkit/Spigot/Paper based Minecraft server used by Minebench.de | Looking for an 1.17 version? If so most patches are PRd into Paper now, Origami 1.17 will continue once patches that Paper wont accept are necessary.
Stars: ✭ 29 (+163.64%)
Mutual labels:  minecraft-server
Minecraft Prometheus Exporter
A Bukkit plugin which exports minecraft server stats to Prometheus
Stars: ✭ 150 (+1263.64%)
Mutual labels:  minecraft-server
Mirai
Mirai 未来 - A powerful Minecraft Server Software coming from the future
Stars: ✭ 325 (+2854.55%)
Mutual labels:  minecraft-server
e5-api-renew-scf
本项目已进入半废弃状态(因为我自己的开发者订阅在2020年12月掉了)所以这里可能只能提供基础技术指导——[腾讯云函数专用]通过重复调用MS Graph API来试图续订Office 365开发者试用
Stars: ✭ 39 (+254.55%)
Mutual labels:  tencent-cloud
Parties
Party manager plugin for your Minecraft server!
Stars: ✭ 61 (+454.55%)
Mutual labels:  minecraft-server
Sponge
The SpongeAPI implementation targeting vanilla Minecraft and 3rd party platforms.
Stars: ✭ 241 (+2090.91%)
Mutual labels:  minecraft-server
mc-server-wrapper
Lightweight Minecraft server wrapper binary for Discord chat bridge + enhanced management tools
Stars: ✭ 17 (+54.55%)
Mutual labels:  minecraft-server
Elytra
A Cleanroom minecraft server API in kotlin
Stars: ✭ 54 (+390.91%)
Mutual labels:  minecraft-server
Gomint
GoMint is a modern Minecraft Bedrock Edition server enabling you to make your visions come true
Stars: ✭ 208 (+1790.91%)
Mutual labels:  minecraft-server
CORE
Core of NodeMC, including stock dashboard and setup files.
Stars: ✭ 43 (+290.91%)
Mutual labels:  minecraft-server
Minestat
📈 A Minecraft server status checker
Stars: ✭ 168 (+1427.27%)
Mutual labels:  minecraft-server
LevelledMobs
Level-up mobs on your Spigot/Paper server, RPG-style!
Stars: ✭ 143 (+1200%)
Mutual labels:  minecraft-server
EliteMobs
This is a spigot plugin that aims to extend Minecraft's survival endgame by making mobs more interesting.
Stars: ✭ 114 (+936.36%)
Mutual labels:  minecraft-server
LiteXLoader
This project has been merged into LiteLoaderBDS 👇 click below to new project 本项目已经合并到 LiteLoaderBDS 项目中 👇 点击前往 https://github.com/LiteLDev/LiteLoaderBDS
Stars: ✭ 84 (+663.64%)
Mutual labels:  minecraft-server
MineColab
Run Minecraft Server on Google Colab.
Stars: ✭ 135 (+1127.27%)
Mutual labels:  minecraft-server

CloudMinecraft

Create a minecraft server with TencentCloud API when the worlds are saved in another Student's Cloud.

简述

这是一个基于腾讯云API的简单低成本开服方案的实现,起初的想法来自于Best33:https://best33.com/179.moe
另外在这个项目产生前一天,Ghosin已经创造了对接了机器人的PYPython版:https://github.com/Ghosin/dejavu
我在用PHP写的时候确实遇到了一些麻烦,感谢众人的指导.

实现原理要说难也不难.首先是前台(可以对接机器人)调用控制服务器上的CloudMC API(main.php),由此发出请求通过QcloudAPI创建 云服务器(按量计费)并通过php的扩展连接ssh,通过sftp传输打包存档并进行解压、部署,运行Minecraft服务器.达到条件关闭服务器的时候,
远程向screen发送指令停止MC服务器并进行打包传回控制服务器.控制服务器最后释放掉该按量付费服务器。

其中的文件传输全靠同一区域的内网传输(用外网怕不是吃一堆流量,还很慢).

应用要求

  1. 有一台腾讯云(最好是学生云)服务器.
  2. 你想开一个Minecraft基友服而不是大服(QCloud很贵的).

环境要求

  • 安装PHP SSH2扩展(好似PHP版本>=7.0才有?)
  • 启用函数exec();

配置

  • conf.php中进行基本配置,包括:

    1. 访问的授权key.
    2. 腾讯云的API secret id和key以及其他实例创建配置.
    3. 服务器释放/保留时间配置.
    4. 配置的区域一定要和你已有的一台云的区域一样(这样内网才互通).
  • 将目录下所有文件上传到已有的一台云上的网站目录(main.php是在非CLI模式执行的).

  • 访问DemoPage内的server.html或者机器人对接main.php,开始云上Minecraft.

  • 务必在网站服务器设置不可访问server.json,在创建服务器时server.json会用来储存必要的信息!

对接main.php

  • 向main.php发出post请求:

    • 请求的键.
    请求键
    key 访问的授权key
    command 发送的指令
    • 请求的url参数**?action=**.
    Action post要携带的键值 作用
    create key 开始执行创建服务器
    progress key 查看服务器的执行状态
    skip key 中止目前正在执行的任务(可以用来关服)
    sendcommand key , command 发送特定的指令(不带/)至Minecraft服务器
    • 例如我想创建新的服务器,带上key值post main.php?action=create,详情看DemoPage源码.

感言

这回研究API真的花费了我很多时间,但也是我第一次尝试对接服务商API.该项目耗费了我两整天,可能代码不精,有问题望发issue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].