介绍
Minecraft servers, if left running constantly, will continually increase their RAM usage. Regularly restarting your server is incredibly important to avoid this, and the Scheduled Restart mod allows you to easily automate the process.
This mod is based on ruin9999’s Simple Server Restart mod, with some small improvements.
How to use
In order to allow the mod to restart the server, the config setting startScriptPath must be set to the name of the server’s startup script. The startup script will be a .bat file on Windows systems, or a .sh file on Unix systems, and will likely be named “start”, “entrypoint” or something similar.
If your server does not have a startup script, you will need to make one yourself. Make sure the contents of the startup script are the same as the command used to run the server. It should look something like this: java -Xmx128M -Xms1024M -jar server.jar nogui. Do not use this command, use the one that is used to start your server.
The schedule of automatic restarts is fully configurable in the config file. By default, the server will restart at midnight every day, with a warning in chat 5 minutes in advance, and another 30 seconds in advance. The server will also by default restart if no players are online for an hour.
常见问题
Scheduled Restart 支持哪些 Minecraft 版本?
Scheduled Restart 支持 Minecraft Java 版 1.15–26.2,共 42 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
Scheduled Restart 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
评论
登录后评论和评分