如果 Minecraft 服务器一直持续运行,其内存占用会不断上升。定期重启服务器非常重要,而 Scheduled Restart 模组让你可以轻松自动化这一流程。
本模组基于 ruin9999 的 Simple Server Restart 模组,并做了一些小改进。
使用方法
为了让模组能够重启服务器,配置文件中的 startScriptPath 必须设置为服务器启动脚本的名称。在 Windows 系统上,启动脚本通常是一个 .bat 文件;在 Unix 系统上则是一个 .sh 文件,文件名很可能为 “start”、“entrypoint” 或类似名称。
如果你的服务器没有启动脚本,你需要自己创建一个。确保启动脚本的内容与用于运行服务器的命令相同。它可能看起来像这样:java -Xmx128M -Xms1024M -jar server.jar nogui。不要使用这个示例命令,请使用实际用于启动你服务器的命令。
自动重启的时间表可以在配置文件中完全自定义。默认情况下,服务器会在每天午夜重启,并在提前 5 分钟和 30 秒时在聊天栏发出警告。此外,如果一小时内没有任何玩家在线,服务器也会默认重启。
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
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Scheduled Restart
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Scheduled Restart
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Scheduled Restart
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Scheduled Restart
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Scheduled Restart
下载 Scheduled Restart
下载 Scheduled Restart
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Scheduled Restart
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Scheduled Restart
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
原版世界生成优化模组
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
评论 0
登录后参与评分
还没有评论,来抢沙发吧