跳到正文

EzRestart

作者:Producks

Restarts the server when it is empty and flagged. Auto-flags once per day at a configurable time, and adds a /ezrestart command.

收藏

介绍

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

Requires Fabric API

EzRestart

A lightweight, server-side Fabric mod that restarts your server without kicking anyone. Instead of stopping at a fixed time, EzRestart flags the server for a restart and then waits until it is empty, so players never get interrupted mid-session.

How it works

Once per day at a configurable time (default 04:00, with an optional timezone setting), the server is automatically flagged. The next time the player count hits zero, the server shuts down cleanly and your wrapper script or host panel brings it back up. If the shutdown hangs, a watchdog forces the JVM to exit after a configurable timeout so the server never gets stuck half-stopped.

Commands

  • /ezrestart flag — flags the server to restart the next time it is empty
  • /ezrestart cancel — clears a pending restart flag
  • /ezrestart status — shows the current flag and settings
  • /ezrestart reload — reloads the config from disk
  • /ezrestart set time <HH:mm> — sets the daily restart time (24hr e.g. 22:30)
  • /ezrestart set auto <true|false> — toggles the daily auto-flag
  • /ezrestart set timezone <zone> — sets the scheduling timezone (IANA id like America/New_York, or system)
  • /ezrestart set timeout <seconds> — sets the shutdown watchdog timeout (0 disables it)

Commands use Fabric Permissions API nodes (ezrestart.command.*) and fall back to vanilla OP levels.

Configuration

Settings live in config/ezrestart.json and can also be changed in-game with the set subcommands.

Notes

EzRestart stops the server; something else has to start it again. Run it under a restart-on-exit wrapper script, systemd unit, or a host panel with auto-restart enabled.

常见问题

EzRestart 支持哪些 Minecraft 版本?

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

EzRestart 怎么安装?

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

评论

登录后评论和评分

Producks 的其他作品

查看全部 →