小军a


零落Y_
CMI貌似没有自动重启吧  硬要说怎么实现可以试试定时任务?https://www.mcbbs.net/forum.php? ... 67&pid=15927729
不过还是建议使用这个插件 https://www.mcbbs.net/thread-1195073-1-1.html

嘉晚饭,赢
本帖最后由 嘉晚饭,赢 于 2022-2-18 19:24 编辑

编辑schedules.yml 编辑stopserver下面的enabled为true
  1. StopServer:
  2.   Enabled: true
  3.   PerformOn:
  4.     1:
  5.       Hour: 3
  6.       Minute: 59
  7.       Second: 30
  8.   Commands:
  9.   - actionbar! &eServer will stop in &630 &esec!
  10.   - delay! 5
  11.   - actionbar! &eServer will stop in &625 &esec!
  12.   - delay! 5
  13.   - actionbar! &eServer will stop in &620 &esec!
  14.   - delay! 5
  15.   - actionbar! &eServer will stop in &615 &esec!
  16.   - delay! 5
  17.   - actionbar! &eServer will stop in &610 &esec!
  18.   - delay! 5
  19.   - actionbar! &eServer will stop in &65 &esec!
  20.   - delay! 1
  21.   - actionbar! &eServer will stop in &64 &esec!
  22.   - delay! 1
  23.   - actionbar! &eServer will stop in &63 &esec!
  24.   - delay! 1
  25.   - actionbar! &eServer will stop in &62 &esec!
  26.   - delay! 1
  27.   - actionbar! &eServer will stop in &61 &esec!
  28.   - delay! 1
  29.   - kickall! &eServer will be back online soon!
  30.   - delay! 1
  31.   - stop
复制代码


然后其中的
  1.       Hour: 3
  2.       Minute: 59
  3.       Second: 30
复制代码

就是关闭服务器的 时间 分钟 秒

然后修改一下启动脚本 弄成可以自动重启的那种就好了
最简单的就是这么写
  1. :start
  2.         @echo off
  3.         java -jar 核心文件.jar nogui
  4.         pause
  5.         goto start
复制代码

第一页 上一页 下一页 最后一页