# SmartRestart
A smart restart plugin for Spigot/Paper servers with scheduled, TPS-based, and AFK restarts.
---
## Features
- ⏰ Restart at scheduled times (like `03:00`, `12:00`)
- Auto-restart if TPS drops under configurable threshold
- Restart when all players are AFK (no movement)
- Configurable messages and delay
- Lightweight and efficient
- Supports custom timezones (like `"Europe/London"`)
- Restart reason logging to file
Commands
- /smartrestart now – Force restart with 30s delay
- Permission: smartrestart.admin
---
## ⚙️ Configuration
```yaml
restart-times:
- "03:00"
- "12:00"
- "20:00"
tps-monitor:
enabled: true
tps-threshold: 15.0
duration-seconds: 30
afk-monitor:
enabled: true
check-every-seconds: 60
afk-threshold-minutes: 10
timezone: "UTC"
messages:
restart-warning: "&cServer restart in &e{time} &cseconds!"
restart-now: "&4Server restarting now..."
reason-tps: "Low TPS"
reason-afk: "All players AFK"
reason-scheduled: "Scheduled restart"
logging:
enabled: true
log-file: "logs/restarts.log"
discord:
https://discord.gg/JmMdSgA5qn