AutoRestartBungee
为你的 BungeeCord 代理提供每日自动重启——附带对玩家友好的倒计时警告(以及可选的自动更新集成)
AutoRestartBungee 会每天在固定时间自动重启你的 BungeeCord 代理。
这有助于进行定期维护、清理内存并提升稳定性。你可以选择将其与自定义启动脚本结合使用,以便在重启期间自动下载并应用最新的 BungeeCord 版本——让你的代理始终保持最新状态,毫不费力。
主要功能
- 在你设定的时间(例如凌晨 4:00)执行每日计划内重启
- 可自定义的倒计时警告(支持多个阶段:15 分钟、10 分钟、5 分钟等)
- 全网络彩色广播消息(支持 Minecraft 颜色代码和十六进制颜色)
- 极其轻量——几乎零性能影响
- 配置简单——无需复杂命令
- 兼容当前版本的 BungeeCord(已测试至 1.21.x)
安装方法
- 下载最新的 AutoRestartBungee .jar 文件
- 将其放入你的 BungeeCord
/plugins/ 文件夹中
- 启动(或重启)代理一次 → 配置文件将自动生成
- 根据你的喜好调整重启时间和警告信息
可选:通过启动脚本启用自动更新
虽然 AutoRestartBungee 负责定时重启和警告提示,但你还可以选择修改你的启动脚本(start.sh),以便每次代理重启时下载最新的 BungeeCord 版本。这样可以将每日重启同时变为自动更新:
#!/bin/sh
while true
do
# 删除旧 jar 包(如果存在)
rm -f BungeeCord.jar
# 下载最新的 BungeeCord 构建版本
echo "Downloading latest BungeeCord version..."
wget -O BungeeCord.jar https://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/BungeeCord.jar
# 启动代理
java -Xmx512M -jar BungeeCord.jar
echo ""
echo "Press Ctrl+C now if you want to completely stop the server!"
echo "Restarting in:"
for i in 5 4 3 2 1
do
echo "$i..."
sleep 1
done
echo "Restarting now!"
done
注意:
- 上述链接始终指向官方 md_5 Jenkins 上最新的成功构建版本。
- 你可以根据需要调整内存参数(
-Xmx)、添加垃圾回收标志等。
- 使脚本具备可执行权限:
chmod +x start.sh
为什么使用 AutoRestartBungee?
- 可靠的每日重启配合合理的玩家警告 → 减少投诉
- 无需借助外部工具或 cron 作业即可安排任务
- 易于扩展(可根据需要添加任意数量的警告阶段)
- 可选的自动更新集成功能,让你轻松保持 BungeeCord 为最新版本
享受一个稳定且维护良好的代理网络!
如有错误报告、建议或疑问 → 欢迎提交 Issue。
AutoRestartBungee
Daily auto-restart for your BungeeCord proxy – with player-friendly countdown warnings (and optional auto-update integration)
AutoRestartBungee automatically restarts your BungeeCord proxy every day at a fixed time.
This ensures regular maintenance, memory cleanup, and stability. Optionally, you can combine it with a custom start script to automatically download and apply the latest BungeeCord version during restarts – keeping your proxy up-to-date effortlessly.
Key Features
- Daily scheduled restart at your chosen time (e.g. 4:00 AM)
- Customizable countdown warnings (multiple stages: 15 min, 10 min, 5 min, etc.)
- Colored, network-wide broadcast messages (supports Minecraft color codes & hex)
- Very lightweight – almost zero performance impact
- Simple configuration – no complex commands required
- Works with current BungeeCord versions (tested up to 1.21.x)
Installation
- Download the latest AutoRestartBungee .jar
- Place it in your BungeeCord
/plugins/ folder
- Start (or restart) the proxy once → the config file will be created automatically
- Adjust the restart time and warning messages to your liking
Optional: Enable Auto-Updates via Start Script
While AutoRestartBungee handles the timed restarts and warnings, you can optionally modify your start script (start.sh) to download the latest BungeeCord version each time the proxy restarts. This turns your daily restarts into auto-updates as well:
#!/bin/sh
while true
do
# Remove old jar (if exists)
rm -f BungeeCord.jar
# Download the latest BungeeCord build
echo "Downloading latest BungeeCord version..."
wget -O BungeeCord.jar https://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/BungeeCord.jar
# Start the proxy
java -Xmx512M -jar BungeeCord.jar
echo ""
echo "Press Ctrl+C now if you want to completely stop the server!"
echo "Restarting in:"
for i in 5 4 3 2 1
do
echo "$i..."
sleep 1
done
echo "Restarting now!"
done
Notes:
- The link above always points to the most recent successful build from the official md_5 Jenkins.
- Feel free to adjust memory (
-Xmx), add GC flags, etc.
- Make the script executable:
chmod +x start.sh
Why use AutoRestartBungee?
- Reliable daily restarts with fair player warnings → fewer complaints
- No external tools or cron jobs needed for scheduling
- Easy to extend (add as many warning stages as you want)
- Optional integration for auto-updates keeps BungeeCord fresh without extra effort
Enjoy a stable and well-maintained proxy network!
Bug reports, suggestions or questions → feel free to open an issue.
评论 0
登录后参与评分
还没有评论,来抢沙发吧