AutoRestart
PluginMIT

AutoRestart

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.

527
Downloads
0
Followers
1 years ago
Updated
📦
1
Versions

📖About AutoRestart

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.

Installation

  1. Download the Plugin:

    • Compile the plugin or download the precompiled .jar file.
  2. Place the Plugin:

    • Move the .jar file to the plugins folder of your Minecraft server directory.
  3. 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.

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.