• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

gekware/minecraft-server-hibernation: Autostart and stop minecraft-server when p ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

gekware/minecraft-server-hibernation

开源软件地址(OpenSource Url):

https://github.com/gekware/minecraft-server-hibernation

开源编程语言(OpenSource Language):

Go 100.0%

开源软件介绍(OpenSource Introduction):

Minecraft Server Hibernation

msh - loc msh - release msh - goreport msh - license msh - stars

Avoid wasting of resources by automatically starting your minecraft server when a player join and stopping it when no one is online
(for vanilla/modded on linux/windows/macos)

version: v2.4.4
Copyright (C) 2019-2021 gekigek99

Check the releases to download the binaries (for linux, windows and macos)

You can compile msh from the dev branch to access a more updated version but beware that it might still need testing


PROGRAM COMPILATION:

This version was successfully compiled in go version 1.15
Compilation procedure:

git clone https://github.com/gekware/minecraft-server-hibernation.git  
cd minecraft-server-hibernation/  
go build .

INSTRUCTIONS:

  1. Install your desired minecraft server
  2. Edit the parameters in config file as needed (check definitions):
    • Folder
    • FileName
    • StartServerParam
    • StopServer
    • * StopServerAllowKill
    • * HibernationInfo and StartingInfo
    • * TimeBeforeStoppingEmptyServer
    • * NotifyUpdate
  3. * put the frozen icon you want in path/to/server.jar/folder (must be 64x64 and called server-icon-frozen.png)
  4. on the router (to which the server is connected): forward port 25555 to server (tutorial)
  5. on the server: open port 25555 (example: ufw firewall)
  6. run the msh executable
  7. you can connect to the server through port 25555

* = it's not compulsory to modify this parameter

remember to automatically run msh at reboot


DEFINITIONS:

only text in braces needs to be modified (remember to remove all braces)

Location of server folder and executable. You can find protocol/version here (but msh should set them automatically):

"Server": {
  "Folder": "{path/to/server/folder}",
  "FileName": "{server.jar}",
  "Protocol": 756,
  "Version": "1.17.1"
}

Commands to start and stop minecraft server:

"Commands": {
  "StartServer": "java <Commands.StartServerParam> -jar <Server.FileName> nogui",
  "StartServerParam": "-Xmx1024M -Xms1024M",
  "StopServer": "stop",
  "StopServerAllowKill": 10
}
# if StopServerAllowKill is more than 0, then the specified number is the amount of seconds
# given to the minecraft server to go offline, after which it is killed

Set the logging level for debug purposes

"Debug": 1
# 0 - NONE: no log
# 1 - BASE: basic log
# 2 - SERV: mincraft server log
# 3 - DEVE: developement log
# 4 - BYTE: connection bytes log

Hibernation and Starting server description

"InfoHibernation": "                   §fserver status:\n                   §b§lHIBERNATING",
"InfoStarting": "                   §fserver status:\n                    §6§lWARMING UP",

Set to false if you don't want to notify updates in game chat (every 20 minutes)

"NotifyUpdate": true

60 seconds is the time (after the last player disconnected) that the script waits before hibernating the minecraft server

"TimeBeforeStoppingEmptyServer": 30     #any parameter more than 30s is recommended

Some of these parameters can be configured with command-line arguments (--help to know which)


CREDITS:

Author: gekigek99

Contributors: najtin, f8ith, Br31zh, someotherotherguy, navidmafi, cromefire
Docker branch: lubocode

If you wish to contribute, please create a pull request using the dev branch as the base for your changes


Give a star to this repository on github!




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
InventivetalentDev/AnimatedFrames: Play GIFs in Minecraft发布时间:2022-08-16
下一篇:
Thinkofname/steven-go: Go Minecraft Client发布时间:2022-08-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap