Auto ShutDown / Restart

Discontinued Auto ShutDown / Restart 1.0.1

Compatible API Versions
1.0.8
Sourcecode
https://github.com/Extollite/AutoShutdown
Contributors
Extollite, matjamzero
Original author: https://dev.bukkit.org/projects/auto-shutdown/

This plugin allows you to schedule a time when you want to shutdown your server. It is happening every day automatically.
Plugin also provide simple warnings before shutdown.

If you want to server automatically restart, you should use script.

Windows Script:
Code:
:loop
java -Xms1G -Xmx1G -jar nukkit-1.0-SNAPSHOT.jar
:: "/t 10" means timeout 10 sec. change to "/t 5" for timeout 5 sec.
choice /t 10 /c yn /cs /d y /m "Do you want to restart (Y/N)?"
if errorlevel 2 goto :no
if errorlevel 1 goto :loop
:no

Linux Script:
Code:
#!/usr/bin/env bash

while true; do

java -Xms1G -Xmx1G -jar nukkit-1.0-SNAPSHOT.jar

#"-t 10" means timeout 10 sec. Set to "-t 5" for timeout 5 sec.
read -t 10 -n 1 -p "Do you want to restart [y/n]? " answer

[ -z "$answer" ] && answer="y"  # if 'yes' have to be default choice

if [ "$answer" = "n" ]; then
    break
fi

done


Config.yml:
Code:
kickreason: Scheduled Shutdown.
warntimes: 900,600,300,240,180,120,60,45,30,20,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1 #For shutdown without warning set to 0
gracetime: 20 #How many seconds to shutdown after using /as set now
kickonshutdown: true #I recommend not to change
shutdowntimes: 3:00,8:00,11:00,14:00,17:00
shutdownmessage: Server is shutting down

Commands:
/as cancel - Cancels the currently executing shutdown
/as set HH:MM - Sets a new scheduled shutdown time
/as set now - Orders the server to shutdown immediately
/as list - Lists the currently scheduled shutdowns

Permissions:
Code:
  autoshutdown.command:
    description: "Main command permission"
    default: op

For troubleshooting PM at Discord: exto#3741

Thumbnail is free to use icon by https://gumroad.com/deemakdaksina
Author
Extollite
Downloads
1,940
Views
4,134
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Extollite

Latest updates

  1. Bug fixes

    Small bug fixes
Top