Compatibility
Minecraft: Java Edition
Platforms
Links
Tags
Creators
Details
Zhou's AutoRestart
A lightweight, feature-rich automatic server restart plugin for Minecraft. It provides precise scheduling, a safe saving mechanism (save-all → kick → stop), and immersive multi-stage countdowns to ensure a smooth and safe server maintenance experience.
🛠️ Verified & Tested: All features have been fully tested and are working perfectly on a real Mohist server environment.
✨ Features
- Safe Scheduled Restarts: Automatically restarts at
04:00by default. The process is completely safe: runssave-all➔ kicks online players ➔ executes/stop. - Multi-stage Warnings: Broadcasts warnings at
03:00,03:30,03:45,03:50,03:55, and03:59(1 minute left). All messages and timestamps are fully customizable. - Immersive Final Countdown: During the last 10 seconds, a large text countdown appears on the center of the screen alongside chat messages.
- Welcome Back Message: Players who join within 5 minutes after a restart will receive a welcome message: "Server restart complete, welcome back!"
🎮 Commands
| Command | Description |
|---|---|
/restart |
Triggers a manual restart (with a default 60s countdown) |
/restart 300 |
Triggers a restart with a custom countdown (e.g., 300s) |
/restart cancel |
Cancels the current restart countdown |
/restart status |
Checks the current restart status |
/restart reload |
Reloads the configuration file |
/restart now |
Skips the countdown and restarts immediately |
💬 Default Messages
text
[Server] Server will restart in 1 hour (04:00) for maintenance. Please save your progress.
[Server] Server will restart in 30 minutes (04:00). Please finish your current activities.
[Server] Server will restart in 15 minutes. Please return to a safe location.
[Server] Server will restart in 10 minutes.
[Server] Server will restart in 5 minutes. Please get ready.
🌐 Language & Localization
The native language of this plugin is Chinese. All default in-game messages, broadcast warnings, and countdown texts are provided in Chinese.
If you are running an English server or a server of another language, you don't need to worry! Every single text element can be fully translated and customized in the config.yml file. No hardcoded messages.
🔄 Auto-Restart Script (Important)
This plugin handles the scheduled saving and stopping of the server. However, the server needs an external environment (like a start script or panel) to boot it back up after the /stop command is executed.
If you are hosting on Windows, use this .bat script to start your server. It will automatically restart the server 10 seconds after the plugin shuts it down.
(Note: Replace [YourServerJar].jar with your actual server core name, e.g., mohist.jar or paper.jar)
@echo off
call :title
cd /d "%~dp0"
set "START_DELAY=10"
:loop
call :title
echo.
echo ========================================
echo Starting server ... %date% %time%
echo ========================================
java -Xms2G -Xmx10G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -jar [YourServerJar].jar nogui
echo.
echo Server stopped at %date% %time%
echo Restarting in %START_DELAY% seconds ... close this window or press Ctrl+C to stop completely
ping -n %START_DELAY% 127.0.0.1 >nul
goto loop
:title
title Server
exit /b
服务器自动重启插件
这是一款专为 Minecraft 服务器打造的轻量级自动重启插件。插件不仅提供精准的定时重启,还内置了安全的存档机制与丰富的多级倒计时提醒,确保服务器平稳运行,玩家数据万无一失。
🛠️ 实测认证: 本插件已在真实的 Mohist 服务端环境中进行过完整测试,所有功能均正常运行。
✨ 核心功能
安全定时重启:默认在每天 04:00 自动执行重启。重启流程极度安全:先执行 save-all 保存所有数据 ➔ 踢出在线玩家 ➔ 执行 /stop 关闭服务器。
多级提前通知:默认在 03:00、03:30、03:45、03:50、03:55 以及 03:59(最后1分钟)进行全服通报。所有文案可改,触发时间点可任意增删。
沉浸式最后倒计时:在重启前的最后 10 秒,屏幕正中央会出现大字倒计时,同时伴随聊天栏提示,确保玩家不会错过。
回归温馨提醒:服务器重启完成后,5 分钟内进入服务器的玩家,会收到专属提示:「服务器已重启完成,欢迎回来」。
🎮 管理指令
除了自动重启,服主也可以通过指令进行手动管理与干预:
指令 描述 /restart 发起手动重启(默认带有 60 秒倒计时) /restart 300 发起带自定义秒数(如 300 秒)倒计时的重启 /restart cancel 取消当前正在进行的重启倒计时 /restart status 查看当前的重启状态 /restart reload 重新加载配置文件 /restart now 跳过倒计时,立即重启服务器
💬 默认通知文案预览
插件内置了原生且友好的中文提示,你可以随时在配置文件中修改它们:
[服务器公告] 服务器将在 1 小时 后 (04:00) 重启维护,请提前保存进度。
[服务器公告] 服务器将在 30 分钟 后 (04:00) 重启,请尽快结束当前活动。
[服务器公告] 服务器将在 15 分钟 后重启,请回到安全位置。
[服务器公告] 服务器将在 10 分钟 后重启。
[服务器公告] 服务器将在 5 分钟 后重启,请做好准备,重启后将自动恢复。
⚠️ 关于服务器自动唤醒的重要说明
插件本身只负责执行安全保存并关闭服务器(执行 /stop)。服务器关闭后,需要外部环境(如开服脚本或面板)将其重新唤醒。
如果你使用的是 Windows 系统,建议使用以下批处理脚本(.bat)启动服务器。它会在插件关闭服务器后,等待 10 秒自动重新拉起核心:
(注:请将 [你的服务器核心].jar 替换为你实际的核心文件名,如 mohist.jar)
@echo off
call :title
cd /d "%~dp0"
set "START_DELAY=10"
:loop
call :title
echo.
echo ========================================
echo Starting server ... %date% %time%
echo ========================================
java -Xms2G -Xmx10G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -jar [你的服务器核心].jar nogui
echo.
echo Server stopped at %date% %time%
echo Restarting in %START_DELAY% seconds ... close this window or press Ctrl+C to stop completely
ping -n %START_DELAY% 127.0.0.1 >nul
goto loop
:title
title Server
exit /b
⚙️ 配置与安装
配置文件路径:plugins/MCPanelRestart/config.yml
支持 & 颜色代码(例如 &c 为红色)。
修改配置后,在游戏内输入 /restart reload 即可立即生效,无需重启服务器。


