CMI貌似没有自动重启吧  硬要说怎么实现可以试试定时任务?https://www.mcbbs.net/forum.php? ... 67&pid=15927729
不过还是建议使用这个插件 https://www.mcbbs.net/thread-1195073-1-1.html
不过还是建议使用这个插件 https://www.mcbbs.net/thread-1195073-1-1.html
 本帖最后由 嘉晚饭,赢 于 2022-2-18 19:24 编辑 
编辑schedules.yml 编辑stopserver下面的enabled为true
复制代码
然后其中的
复制代码
就是关闭服务器的 时间 分钟 秒
然后修改一下启动脚本 弄成可以自动重启的那种就好了
最简单的就是这么写
复制代码
编辑schedules.yml 编辑stopserver下面的enabled为true
- StopServer:
 
-   Enabled: true
 
-   PerformOn:
 
-     1:
 
-       Hour: 3
 
-       Minute: 59
 
-       Second: 30
 
-   Commands:
 
-   - actionbar! &eServer will stop in &630 &esec!
 
-   - delay! 5
 
-   - actionbar! &eServer will stop in &625 &esec!
 
-   - delay! 5
 
-   - actionbar! &eServer will stop in &620 &esec!
 
-   - delay! 5
 
-   - actionbar! &eServer will stop in &615 &esec!
 
-   - delay! 5
 
-   - actionbar! &eServer will stop in &610 &esec!
 
-   - delay! 5
 
-   - actionbar! &eServer will stop in &65 &esec!
 
-   - delay! 1
 
-   - actionbar! &eServer will stop in &64 &esec!
 
-   - delay! 1
 
-   - actionbar! &eServer will stop in &63 &esec!
 
-   - delay! 1
 
-   - actionbar! &eServer will stop in &62 &esec!
 
-   - delay! 1
 
-   - actionbar! &eServer will stop in &61 &esec!
 
-   - delay! 1
 
-   - kickall! &eServer will be back online soon!
 
-   - delay! 1
 
- - stop
然后其中的
-       Hour: 3
 
-       Minute: 59
 
- Second: 30
就是关闭服务器的 时间 分钟 秒
然后修改一下启动脚本 弄成可以自动重启的那种就好了
最简单的就是这么写
- :start
 
-         @echo off
 
-         java -jar 核心文件.jar nogui
 
-         pause
 
- goto start