Compatibility
Minecraft: Java Edition
1.21
Platforms
Creators
Details
Licensed MIT
Published 6 months ago
Updated 6 months ago
AutoRestart Plugin
The AutoRestart plugin for Spigot is designed to help maintain server stability by automatically restarting the server at regular intervals. It also notifies players 1 minute before the restart, ensuring a smooth experience for everyone.
Features
-
Automatic Server Restart:
- Restarts the server every 10 hours by default.
- Notify players 1 minute before the restart.
-
Configurable Intervals:
- Modify the restart interval and warning time through the
config.yml
file.
- Modify the restart interval and warning time through the
Installation
-
Download the Plugin:
- Compile the plugin or download the precompiled
.jar
file.
- Compile the plugin or download the precompiled
-
Place the Plugin:
- Move the
.jar
file to theplugins
folder of your Minecraft server directory.
- Move the
-
Restart the Server:
- Start or restart your server to load the plugin.
Configuration
The config.yml
file allows you to customize the restart interval and warning time:
restart-interval: 36000 # Default: 10 hours (36000 seconds).
warning-interval: 60 # Default: 1 minute (60 seconds).
restart-interval
: Time (in seconds) between restarts.warning-interval
: Time (in seconds) before the restart when players will be notified.
How It Works
-
Restart Task:
- A task runs periodically to check the restart interval.
- When the warning interval is reached, players receive a notification via chat and titles.
- The server restarts automatically after the warning interval.
-
Customizable Behavior:
- Adjust the
config.yml
to suit your server's needs without editing the code.
- Adjust the
Compatibility
- Minecraft Version: 1.21+
- API Version: Spigot 1.21
Notes
- Ensure your server has the necessary permissions to execute the restart command.
- Test the plugin on a development server before deploying it on a live server.