Auto Shutdown Mod

模组

· 作者 novalake

支持空闲检测、投票和热重载的 Minecraft 服务器自动关闭模组。

0 本站下载 0 关注 更新于 3 个月前

最新 1.20.1-1.2.0 · 1.20.1 · Forge

一键开服(送7天)

Auto Shutdown

一款功能强大的 Minecraft 服务器自动关闭模组,支持 Forge 和 NeoForge 加载器。它支持定时关闭、空闲检测、玩家投票以及针对多种关闭方式的服务器监控。

Forked from: targren/forgeautoshutdown

✨ Features

? Scheduled Shutdown

  • Support daily fixed time shutdown (e.g., 5:00 AM daily)
  • Support uptime-based shutdown (e.g., after 24 hours of runtime)
  • Automatic countdown broadcast before shutdown (default 5 times)
  • Optional delay when players are online

? Idle Auto-Shutdown (New Feature)

  • Monitor server during specified time periods
  • Start countdown when no players detected
  • Automatic shutdown after set idle time
  • Support cross-midnight time periods
  • Perfect for saving server resources

?️ Player Voting Shutdown

  • Players can initiate shutdown votes
  • All players participate in voting
  • Configurable minimum voter count
  • Configurable maximum "no" votes
  • Vote cooldown to prevent abuse

? Server Watchdog

  • Monitor server response status
  • Detect low TPS situations
  • Auto-restart when server hangs
  • Support soft and hard shutdown
  • ⚠️ Use with caution, may cause data loss

? Hot-Reload Configuration

  • No server restart needed after config changes
  • One-click reload all configuration items
  • Real-time configuration status viewing
  • Convenient for debugging and quick adjustments

? Requirements

Platform Minecraft Loader Java
Forge 1.20.1 Forge 47.3.0+ 17
NeoForge 1.21.1 NeoForge 21.1+ 21

Installation: Server-side (Required) - Client-side (Optional, for localized messages)

? Commands

Player Commands

/shutdown              # Start shutdown vote
/shutdown yes          # Vote yes
/shutdown no           # Vote no

Admin Commands (Requires OP level 3)

/auto_shutdown reload    # Hot-reload configuration
/auto_shutdown status    # View current configuration status

⚙️ Configuration

Configuration file location: world/serverconfig/auto_shutdown-server.toml

Configuration Categories

Category Description
[Schedule] Scheduled shutdown configuration
[Voting] Player voting shutdown configuration
[Watchdog] Server watchdog monitoring configuration
[IdleShutdown] Idle auto-shutdown configuration
[Messages] Custom message text

Idle Auto-Shutdown Configuration Example

[IdleShutdown]
    # Enable idle auto-shutdown
    Enabled = true
    
    # Monitoring time period (24-hour format)
    StartHour = 0        # Start hour (0-23)
    StartMinute = 0      # Start minute (0-59)
    EndHour = 23         # End hour (0-23)
    EndMinute = 59       # End minute (0-59)
    
    # Idle timeout settings
    IdleTimeout = 30     # Minutes to wait before shutdown (1-1440)
    CheckInterval = 1    # Check interval in minutes (1-60)

Usage Scenarios

24/7 Monitoring Mode

StartHour = 0
StartMinute = 0
EndHour = 23
EndMinute = 59
IdleTimeout = 30

Night Energy-Saving Mode

StartHour = 22
StartMinute = 0
EndHour = 6
EndMinute = 0
IdleTimeout = 15

Business Hours Mode

StartHour = 9
StartMinute = 0
EndHour = 18
EndMinute = 0
IdleTimeout = 60

? Hot-Reload Feature

After modifying configuration files, no server restart needed:

  1. Edit configuration file world/serverconfig/auto_shutdown-server.toml
  2. Execute command in-game: /auto_shutdown reload
  3. Configuration takes effect immediately

Reload Process:

  • ✅ Stop all running tasks
  • ✅ Re-read configuration file
  • ✅ Validate configuration
  • ✅ Start tasks based on new configuration

Notes:

  • ⚠️ Hot-reload will reset task states (idle timers, voting status, etc.)
  • ⚠️ Recommend reloading during server idle time
  • ⚠️ Reload failures will show error messages in logs

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源