The latest version of this plugin can always be found HERE
Please use this link instead of github releases as it will always be up to date. 1.0.7 is the latest version currently.
The AutoRestart Plugin is a Minecraft server plugin designed to automate server restarts based on a customizable schedule. It sends out warnings to players prior to the restart and allows for manual restarts as well. The plugin works by reading a cron-style schedule from its configuration and handles both automated and unplanned restarts efficiently.
- Automatic Server Restarts: Configure the server to restart based on a cron schedule.
- Customizable Warning Intervals: Players receive warnings as the restart time approaches.
- Manual Restarts: Trigger server restarts manually and notify players in advance.
- Action Bar Messages: Players are notified with action bar messages about the upcoming restart.
- Server Configuration: Adjust restart time, warning intervals, and command directly from the configuration file.
- Deploy Task: Created a task to automate copying the plugin to the server plugin directory Deploy
- Minecraft Server Version: 1.21+
- Java Version: Java 21 or higher
- Plugin Dependencies: None (this is a standalone plugin)
-
Download the Plugin:
Download the latest version of the AutoRestart plugin from the release page. -
Place the Plugin:
Copy theautorestart-all.jar
file into theplugins/
folder of your Minecraft server. -
Start the Server:
Run or restart your Minecraft server to load the plugin. -
Configure the Plugin:
Edit theconfig.toml
file located inplugins/AutoRestart/
to adjust the restart settings.
-
Clone the Repository:
Clone the repository to your local machine:git clone https://github.com/GlitchApotamus/AutoRestart.git cd path/to/autorestart # windows users gradlew clean build --refresh-dependencies gradlew clean build # linux/macos ./gradlew clean build --refresh-dependencies ./gradlew clean build
-
Place the Plugin:
Copy theautorestart-all.jar
file fromautorestart/build/libs
into theplugins/
folder of your Minecraft server. -
Start the Server:
Run or restart your Minecraft server to load the plugin. -
Configure the Plugin:
Edit theconfig.toml
file located inplugins/AutoRestart/
to adjust the restart settings.
The plugin is configured using the config.toml
file, which is located in the plugin's folder (plugins/AutoRestart/config.toml
).
[restart]
# Cron expression for scheduling automatic restarts (e.g., "0 0 3 * * *" for every 3 AM)
cron = "0 3 * * *"
# Command to execute when the server restarts (e.g., "stop" to stop the server)
command = "stop"
# List of warning intervals (in minutes) before the restart
warningIntervals = [30, 20, 15, 10, 5, 3, 1]
- Simply drag and drop the plugin into your server and start it
- Everything is automated after filling out the toml file
- I also have (3) commands in the project:
reload
,restart
, andcancel
.
All requireop
permissions.- reload: This will reload the configuration file if you change it while server is running.
- restart: This will initiate a manual restart with the given time.
- currently, you should add an extra minute to the delay to function right.
- this will be fixed in an update
- cancel: Use this command cancel the manual restart immediately.
- this is the only function of this command.
- Create a file in the root of the project named "upload.sh"
- copy and paste next line to the script
- scp ./build/libs/autorestart-all.jar path/to/server/plugins/autorestart-all.jar
- edit "path/to/server" to match the proper directory
- if you need it on a server with ssh, use "username@ip:/path/to/server"
gradlew deploy
./gradlew deploy
- This currently is free and open to use. Just please give credit where it's due!
- DuroCodes for helping me get the project set up
- Minecraft Development for making plugin development fast and easy
We welcome contributions! To contribute, please fork the repository and submit a pull request. Ensure that your changes are well-documented, and write tests where applicable.
For issues, feel free to open a new issue or discuss any problems with the team.