A comprehensive and configurable automatic restart plugin for Hytale servers with Discord integration and customizable warning messages.
Server stability is crucial for multiplayer games. Regular restarts help maintain performance, clear memory leaks, and apply updates. HyRestart automates this process with:
- Scheduled restarts at configurable times
- Progressive player warnings before restarts
- Discord webhook notifications
- Fully customizable messages
Whether you're running a small community server or a large Hytale network, HyRestart ensures smooth, predictable server maintenance without surprising your players!
- Configure multiple daily restart times (24-hour format)
- Configurable restart threshold and delays
- Customizable warning intervals (30min, 15min, 5min, 1min by default)
- Broadcast messages to all online players
- Configurable warning messages with placeholders
- Rich embed notifications via webhooks
- Customizable embed titles, descriptions, and colors
- Separate messages for warnings and final restart
- Time placeholder support
- All messages configurable in
config.yml - System log messages customizable
- Warning intervals and messages
- Discord webhook settings
- Easy to translate to any language
1️⃣ Download the plugin
# Download HyRestart-1.0-SNAPSHOT.jar from releases2️⃣ Install on your server
# Place the JAR in your mods folder
cp HyRestart-1.0-SNAPSHOT.jar /path/to/hytale/mods/3️⃣ Start your server
The plugin will automatically create a default config.yml in mods/HyRestart/
4️⃣ Configure your settings
Edit mods/HyRestart/config.yml to customize restart times, messages, and Discord integration
# Restart times (24h format: HH:mm)
restartTimes:
- "03:00"
- "09:00"
- "15:00"
- "21:00"
# Cooldown after a restart to prevent immediate re-restart loops (seconds)
restartCooldownSeconds: 60
# Final restart message
finalRestartMessage: "[Restart] Restarting server NOW!"# Restart warnings
warnings:
- seconds: 1800 # 30 minutes
message: "[Restart] The server will restart in 30 minutes."
discordTime: "30 minutes"
- seconds: 900 # 15 minutes
message: "[Restart] The server will restart in 15 minutes."
discordTime: "15 minutes"
- seconds: 300 # 5 minutes
message: "[Restart] The server will restart in 5 minutes. Get ready!"
discordTime: "5 minutes"
- seconds: 60 # 1 minute
message: "[Restart] The server will restart in 1 minute. DISCONNECT NOW!"
discordTime: "1 minute"discord:
enabled: true
webhookUrl: "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
embedTitle: "🔄 Server Restart"
embedDescription: "The server will restart in **{time}**.\n\nPlease save your progress and disconnect."
embedColor: 16711680 # Red color in decimal
finalEmbedTitle: "⚠️ SERVER RESTARTING"
finalEmbedDescription: "The server is restarting NOW.\n\nThe server will be back in a few minutes."HyRestart supports placeholders in messages for dynamic content:
{time}- Restart time or time remaining{count}- Number of players{message}- Message content{error}- Error details{username}- Player username{code}- Response code{discordTime}- Human-readable time for Discord
Example:
broadcastingToPlayers: "[HyRestart] Broadcasting to {count} players: {message}"1️⃣ Clone the repository
git clone https://github.com/alesixdev/HyRestart.git
cd HyRestart2️⃣ Add libraries
Add HytaleServer.jar on libraries3️⃣ Build with Gradle
./gradlew clean build4️⃣ Ready!
# The built plugin will be at:
build/libs/HyRestart-1.0-SNAPSHOT.jarHyRestart/
├── src/main/
│ ├── java/dev/alesixdev/hyrestart/
│ │ ├── HyRestartPlugin.java # Main plugin entry
│ │ ├── config/
│ │ │ ├── ConfigManager.java # Config loading/saving
│ │ │ ├── ConfigData.java # Config data model
│ │ │ └── WarningConfig.java # Warning data model
│ │ ├── scheduler/
│ │ │ └── RestartScheduler.java # Restart logic
│ │ └── utils/
│ │ └── DiscordWebhook.java # Discord integration
│ └── resources/
│ ├── config.yml # Default configuration
│ └── manifest.json # Plugin manifest
├── build.gradle # Build configuration
└── README.md
- Issues: GitHub Issues
Licensed under the MIT License. Use, modify, and redistribute freely.