跳到正文

Easy Auto Restart

作者:LasaJoniHD

Adds auto restarting to Minecraft servers.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Easy Auto Restart

Easy Auto Restart is a lightweight Fabric mod designed to add simple automatic restarting capabilities to your Minecraft server. It focuses on doing one thing well: managing restarts and executing your start script when the server stops.

Commands

All commands require Operator (OP) permissions.

  • /restart
  • Stops the server immediately and triggers the restart script.
  • /cancelrestart
  • Cancels any currently running restart countdown.
  • /easyautorestart restart
  • Initiates a restart sequence with a 1-minute countdown.
  • /easyautorestart add <HH:mm>
  • Adds a new daily auto-restart time (e.g., /easyautorestart add 04:00).
  • /easyautorestart remove <HH:mm>
  • Removes an existing daily restart time.
  • /easyautorestart list
  • Displays all currently scheduled daily restart times.

Configuration

The configuration file is generated at config/easy-auto-restart.json. You can edit this file directly or use the in-game commands to manage schedules.

{
  "dailyRestartTimes": [
    "04:00",
    "16:00"
  ],
  "scriptPath": "./start.sh",
  "executeScript": true
}
  • dailyRestartTimes: A list of times (24-hour format) when the server should automatically restart.
  • scriptPath: The path to the script that launches your server.
  • Windows users should point this to their .bat file (e.g., ./start.bat).
  • Linux users should point this to their .sh file (e.g., ./start.sh).
  • executeScript: If set to true, the mod attempts to run the file at scriptPath when the server stops. Set to false if you only want the mod to stop the server (e.g., if you use an external wrapper like Pterodactyl or Docker).

Installation & Setup

  1. Move the .jar file into your server’s mods folder.
  2. Start the server once to generate the config.
  3. Important: Ensure you have a valid start script (start.bat or start.sh) in your server’s root directory. The mod relies on this script to bring the server back up after it stops.

常见问题

Easy Auto Restart 支持哪些 Minecraft 版本?

Easy Auto Restart 支持 Minecraft Java 版 1.21.11–26.3,共 4 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

Easy Auto Restart 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。

评论

登录后评论和评分

LasaJoniHD 的其他作品

查看全部 →