跳到正文

Server Restart Command

作者:Veok

Lets server owners restart dedicated Minecraft servers in game or the console.

收藏

截图

介绍

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

🔁 Server Restart Command

A simple server-side Fabric mod that lets Minecraft server owners restart their server from in-game or from the server console.

No client install needed. Players do not need this mod.


✅ What does it do?

Minecraft servers normally cannot start themselves again after they stop.

This mod fixes that by starting a small Java relauncher before the server shuts down.

The relauncher waits for the old server process to fully close, then starts the server again.

Simple. Clean. Useful.


🧠 How restarting works

When you run the restart command, the mod tries to restart the server in this order:

  1. Uses start.bat on Windows or start.sh on macOS/Linux, if the file exists.
  2. Uses launchCommand from the config file, if it is set.
  3. Uses a safe fallback command:
java -Xmx4G -jar fabric-server-launch.jar nogui

⚠️ Fallback RAM warning

If the mod has to use the fallback 4 GB RAM command, it will warn operators after the server starts again.

This warning means the owner should set the real launch command in the config file for better restart behavior.


💬 Commands

/restart
/restartserver
/restart <delay_seconds>
/restartserver <delay_seconds>

⏱️ Example

/restart 60

This restarts the server after 60 seconds.


📦 Requirements

  • Minecraft 26.1, 26.1.1, 26.1.2, or 26.2
  • Fabric Loader 0.19.3 or newer

⚙️ Config file

config/server-restart-command.properties

🛠️ Example config

launchCommand=java -Xmx12G -jar fabric-server-launch.jar nogui
preferStartScript=true
defaultDelaySeconds=5
permissionLevel=4
defaultRamWarningDelaySeconds=60

📝 Important notes

  • This mod is server-side only.
  • Players do not need to install it.
  • This does not reload the server.
  • This means it is not the same as reloading datapacks.
  • It fully stops the server, then starts it again.
  • Operators can use the restart command by default.
  • For best results, use a proper start.bat, start.sh, or launchCommand.

🧱 Made for server owners who want one simple thing

Restart the server without touching the server window every time.

常见问题

Server Restart Command 支持哪些 Minecraft 版本?

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

Server Restart Command 怎么安装?

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

评论

登录后评论和评分

Veok 的其他作品

查看全部 →