AutoShutdown
AutoShutdown: Automatically Shutdown/Stop your server at a set time every day.
Version: v2.4
This plugin is designed to allow you to simply set a time to have the server shut down at the same time every day, without any manual intervention, and provide users ample warning before it does so.
You should use a script to automatically restart the server when it stops. In that script, you could perform any backups or other maintenance you'd like to perform.
I use this plugin to keep a server healthy for longer than a few days by pre-emptively restarting it before it can get sick.
Example restart script in the forum thread.
Features:
- Time can be set persistently in the configuration file.
- Multiple times can be specified.
- Shutdown time can be set temporarily via commands
- You can cancel the running shutdown.
- You can view the current scheduled shutdown time.
- You can gracefully stop the server with a configurable grace time.
- The warning message times are configurable.
- All connected users can be kicked from the server before the shutdown.
Download AutoShutdown 2.4 JAR (for 1.4.2 craftbukkit prerelease)
Source Code
Requirements:
- SuperPerms compatible permissions plugin. Currently won't limit access to commands without some kind of permissions support.
Installation
- Drop the AutoShutdown.jar file into your plugins directory. At first start, the configuration file is created.
- Edit the config.yml file created in plugins/AutoShutdown/ and change the settings to what you would prefer.
- Either reload the server for the changes to take effect, or use /as reload from within the game. Also, all commands work from the console without the slash.
Upgrading
From all previous versions to 2.2: AutoShutdown.properties file is no longer read. Use the config.yml. I'm not a fan of YAML, but its the standard, and as much as I disagree with bukkit's choice of YAML for configuration files, I have to live with it.
An uncommented config.yml file will be created on first start. Start the server, make changes, then do an /as reload. Or just use /as set HH:MM to set the shutdown times you want.
Configuration Options
- shutdowntimes - the time in HH:MM format to stop the server. You can specify multiple, times, separated by comma.
- kickreason - the reason to provide users when they are kicked.
- kickonshutdown - kick users before shutting the server down. (Better than an end of stream error)
- warntimes - seconds before the shutdown time you would like a warning message broadcast to all users, separated by comma.
- gracetime - seconds to wait before shutting the server down in response to an /as now
Permissions Nodes
- autoshutdown.admin - Access to all autoshutdown commands.
Commands
- /as help - displays in-game help
- /as reload - reload the configuration file (replacing any shutdown you have scheduled currently in memory)
- /as cancel - cancel the currently scheduled shutdown
- /as set HH:MM - set the schedule to a new time. Writes to config.yml to persist the setting.
- /as set now - set the shutdown schedule to shut down within 60 seconds
- /as list - lists what the currently configured shutdown times are
guy go to fishqq the original author has moved it to http://dev.bukkit.org/server-mods/auto-shutdown/
My server is now restarting way more frequently than it should be... I have it set to restart at 1:00 EDT and 13:00 EDT and for some reason it just tried restarting at 00:00 EDT and according to my players, also restarted about 2 hours earlier. Wtf is going on?
EDIT: Apparently I had to delete the old config...
Thank you so much for the custom messages!!! I love it!!!
For the new and up to date pluginpage click me :)
Is there a way to make this plugin say Restart instead of Shutting down when it gives the warnings. I tried to go into the .class fie and change it but when I tried to load the server with the changed .class files it would load the plugin.
Ok, I have been using this for quite a while now, and I have noticed a bug. /as cancel doesn't actually cancel the scheduled shutdown like it's supposed to. It sets it in the memory that it's cancelled, until the next minute increment where it resets, announcing the shutdown time again. This also causes it to shut down even if you tell it to cancel at the last minute. Can you fix this, possibly?
@bwarren97
I am working on the plugin now... I have a coder already working on completely redoing the whole plugin so that it is fixed up and will allow for more features people have asked for!
Click here for the new plugin page!
Has anyone contacted you about fixing this plugin? If not, I would like to help, even though I know barely anything about Java code.
This plugin wont be working properly unless a complete recode is done. The plugin has errors before even finishing booting up. If you are a coder come and PM me and we can work together to fix this wonderful plugin...
@allix8
The plugin is working here on up to 1.4.6.
@ShadowKillerx
you add it before and after to your server start batch file...
@marubal21
yes that is a auto feature of the server when being stopped.
Can I custom displays message?
does the plugin perform a save-all before shutting down?
Please update 1.4.5! Great only plgn!
Hey, for some reason your plug-in won't load for me :(
Last login: Wed Nov 28 00:13:07 on ttys001 Jeff:~ jeff$ /Users/jeff/Desktop/Server\ CraftBukkit\ 1.4.5/Start.command ; exit; 208 recipes 27 achievements 00:17:49 [INFO] Starting minecraft server version 1.4.5 00:17:49 [INFO] Loading properties 00:17:49 [INFO] Default game type: CREATIVE 00:17:49 [INFO] Generating keypair 00:17:50 [INFO] Starting Minecraft server on *:25565 00:17:50 [INFO] This server is running CraftBukkit version git-Bukkit-1.4.5-R0.2-b2488jnks (MC: 1.4.5) (Implementing API version 1.4.5-R0.2) 00:17:50 [SEVERE] Could not load 'plugins/AutoShutdown.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: net/stupendous/autoshutdown/AutoShutdownPlugin : Unsupported major.minor version 51.0 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:154) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230) at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:227) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:205) at net.minecraft.server.ServerConfigurationManagerAbstract.<init>(ServerConfigurationManagerAbstract.java:51) at net.minecraft.server.ServerConfigurationManager.<init>(SourceFile:11) at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:111) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:398) at net.minecraft.server.ThreadServerApplication.run(SourceFile:856) Caused by: java.lang.UnsupportedClassVersionError: net/stupendous/autoshutdown/AutoShutdownPlugin : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:44) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:143) ... 9 more 00:17:50 [INFO] [DynamicBan] Loading DynamicBan v1.2.2b2 00:17:50 [INFO] [Spectate] Loading Spectate v1.7.1 00:17:50 [INFO] [WorldEdit] Loading WorldEdit v5.4.5 00:17:50 [INFO] [CoreProtect] Loading CoreProtect v1.7 00:17:50 [INFO] [FullChest] Loading FullChest v0.4 00:17:50 [INFO] [Lockette] Loading Lockette v1.7.4 00:17:50 [INFO] [Multiverse-Core] Loading Multiverse-Core v2.4-b527 00:17:50 [INFO] [WorldGuard] Loading WorldGuard v5.6.5 00:17:50 [INFO] [PwnFilter] Loading PwnFilter v1.9.1 00:17:50 [INFO] [dynmap] Loading dynmap v0.90-1347 00:17:50 [INFO] [Essentials] Loading Essentials v2.9.5 00:17:50 [INFO] [Dynmap-WorldGuard] Loading Dynmap-WorldGuard v0.30 00:17:50 [INFO] [EssentialsProtect] Loading EssentialsProtect v2.9.5 00:17:50 [INFO] MLog clients using java 1.4+ standard logging. 00:17:50 [INFO] [EssentialsSpawn] Loading EssentialsSpawn v2.9.5 00:17:50 [INFO] [Multiverse-Portals] Loading Multiverse-Portals v2.4-b548 00:17:50 [INFO] [Multiverse-Inventories] Loading Multiverse-Inventories v2.5-b207 00:17:50 [INFO] [EssentialsChat] Loading EssentialsChat v2.9.5 00:17:50 [INFO] [EssentialsAntiBuild] Loading EssentialsAntiBuild v2.9.5 00:17:50 [INFO] Preparing level "world" 00:17:50 [INFO] Preparing start region for level 0 (Seed: -7179065133257783342) 00:17:51 [INFO]
-Bukkit Auto Updater-00:17:51 [INFO] It appears that you're running a Beta Build, when you've specified in bukkit.yml that you prefer to run Recommended Builds. 00:17:51 [INFO] If you would like to be kept informed about new Beta Build releases, it is recommended that you change 'preferred-channel' in your bukkit.yml to 'beta'. 00:17:51 [INFO] With that set, you will be told whenever a new version is available for download, so that you can always keep up to date and secure with the latest fixes. 00:17:51 [INFO] If you would like to disable this warning, simply set 'suggest-channels' to false in bukkit.yml. 00:17:51 [INFO]----- 00:17:51 [INFO] Preparing start region for level 1 (Seed: -5924091872710827891) 00:17:51 [INFO] Preparing spawn area: 16% 00:17:52 [INFO] Preparing start region for level 2 (Seed: -5924091872710827891) 00:17:52 [INFO] [DynamicBan] Enabling DynamicBan v1.2.2b2 00:17:52 [INFO] [DynamicBan] Plugin has been enabled! 00:17:52 [INFO] [DynamicBan] Author of this version: xDrapor 00:17:52 [INFO] [DynamicBan] Using CraftBukkit version 1.4.5-R0.2! 00:17:52 [INFO] [DynamicBan] Checking for PermissionsEx... 00:17:52 [INFO] [DynamicBan] PermissionsEx not installed! Defaulting to operators or other supported Permissions plugins! 00:17:52 [INFO] [Spectate] Enabling Spectate v1.7.1 00:17:52 [INFO] [Spectate] v1.7.1 enabled! 00:17:52 [INFO] [WorldEdit] Enabling WorldEdit v5.4.5 00:17:52 [INFO] WEPIF: Using the Bukkit Permissions API. 00:17:52 [INFO] [CoreProtect] Enabling CoreProtect v1.7 00:17:52 [INFO] CoreProtect version 1.7 is enabled! 00:17:52 [INFO] [CoreProtect] Using file based data storage. 00:17:52 [INFO] [FullChest] Enabling FullChest v0.4 00:17:52 [INFO] FullChest version 0.4 is enabled. 00:17:52 [INFO] [Lockette] Enabling Lockette v1.7.4 00:17:52 [INFO] [Lockette] Version 1.7.4 is being enabled! Yay! (Core version 1.3.5) 00:17:52 [INFO] [Lockette] Detected craftbukkit build [2488] ok. 00:17:52 [INFO] [Lockette] Custom lockable block list: [116, 84, 57] 00:17:52 [INFO] [Lockette] Ignoring linked plugins: [mcMMO] 00:17:52 [INFO] [Lockette] Loading strings file for English by Acru 00:17:52 [INFO] [Lockette] Using ops file for admin permissions. 00:17:52 [INFO] [Lockette] Ready to protect your containers. 00:17:52 [INFO] [Multiverse-Core] Enabling Multiverse-Core v2.4-b527 00:17:52 [INFO] [Multiverse-Core] - Version 2.4-b527 (API v14) Enabled - By Rigby, fernferret, lithium3141 and main00:17:52 [INFO] [AllPay] - Version 10.0 - hooked into Essentials Economy for Multiverse-Core v2.4-b527 00:17:52 [INFO] [Multiverse-Core] Loading World & Settings - 'world' - Env: NORMAL - Type: NORMAL & seed: -7179065133257783342 00:17:53 [INFO] [Multiverse-Core] Loading World & Settings - 'world_nether' - Env: NETHER - Type: NORMAL & seed: -5924091872710827891 00:17:53 [INFO] [Multiverse-Core] Loading World & Settings - 'world_the_end' - Env: THE_END - Type: NORMAL & seed: -5924091872710827891 00:17:53 [INFO] [Multiverse-Core] Loading World & Settings - 'worldsurvival' - Env: NORMAL - Type: NORMAL & seed: -6160284078426282993 00:17:53 [INFO] Preparing start region for level 3 (Seed: -6160284078426282993) 00:17:53 [INFO] [Multiverse-Core] Loading World & Settings - 'superflat' - Env: NORMAL - Type: FLAT & seed: 2628725885973055694 00:17:53 [INFO] Preparing start region for level 4 (Seed: 2628725885973055694) 00:17:54 [INFO] [Multiverse-Core] 5 - World(s) loaded. 00:17:54 [INFO] [WorldGuard] Enabling WorldGuard v5.6.5 00:17:54 [INFO] [WorldGuard] (world) TNT ignition is PERMITTED. 00:17:54 [INFO] [WorldGuard] (world) Lighters are PERMITTED. 00:17:54 [INFO] [WorldGuard] (world) Lava fire is blocked. 00:17:54 [INFO] [WorldGuard] (world) All fire spread is disabled. 00:17:54 [INFO] [WorldGuard] Loaded configuration for world 'world' 00:17:54 [INFO] [WorldGuard] (world_nether) TNT ignition is PERMITTED. 00:17:54 [INFO] [WorldGuard] (world_nether) Lighters are PERMITTED. 00:17:54 [INFO] [WorldGuard] (world_nether) Lava fire is blocked. 00:17:54 [INFO] [WorldGuard] (world_nether) All fire spread is disabled. 00:17:54 [INFO] [WorldGuard] Loaded configuration for world 'world_nether' 00:17:54 [INFO] [WorldGuard] (world_the_end) TNT ignition is PERMITTED. 00:17:54 [INFO] [WorldGuard] (world_the_end) Lighters are PERMITTED. 00:17:54 [INFO] [WorldGuard] (world_the_end) Lava fire is blocked. 00:17:54 [INFO] [WorldGuard] (world_the_end) All fire spread is disabled. 00:17:54 [INFO] [WorldGuard] Loaded configuration for world 'world_the_end' 00:17:54 [INFO] [WorldGuard] (worldsurvival) TNT ignition is PERMITTED. 00:17:54 [INFO] [WorldGuard] (worldsurvival) Lighters are PERMITTED. 00:17:54 [INFO] [WorldGuard] (worldsurvival) Lava fire is blocked. 00:17:54 [INFO] [WorldGuard] (worldsurvival) All fire spread is disabled. 00:17:54 [INFO] [WorldGuard] Loaded configuration for world 'worldsurvival' 00:17:54 [INFO] [WorldGuard] (superflat) TNT ignition is PERMITTED. 00:17:54 [INFO] [WorldGuard] (superflat) Lighters are PERMITTED. 00:17:54 [INFO] [WorldGuard] (superflat) Lava fire is blocked. 00:17:54 [INFO] [WorldGuard] (superflat) All fire spread is disabled. 00:17:54 [INFO] [WorldGuard] Loaded configuration for world 'superflat' 00:17:54 [INFO] [WorldGuard] 74 regions loaded for 'world' 00:17:54 [INFO] [WorldGuard] 3 regions loaded for 'world_nether' 00:17:54 [INFO] [WorldGuard] 2 regions loaded for 'world_the_end' 00:17:54 [INFO] [WorldGuard] 10 regions loaded for 'worldsurvival' 00:17:54 [INFO] [WorldGuard] 13 regions loaded for 'superflat' 00:17:54 [INFO] [PwnFilter] Enabling PwnFilter v1.9.1 00:17:54 [INFO] [dynmap] Enabling dynmap v0.90-1347 00:17:54 [INFO] [dynmap] Using Bukkit Permissions (superperms) for access control 00:17:54 [INFO] [dynmap] Web interface permissions only available for online users 00:17:55 [INFO]----00:17:55 [INFO] [CoreProtect] Version 1.71 now available. 00:17:55 [INFO] [CoreProtect] Download at http://coreprotect.net 00:17:55 [INFO] [CoreProtect] Enjoy CoreProtect? Leave a comment on the thread! 00:17:55 [INFO]----00:17:55 [INFO] [Sponsor] Unlimited Minecraft Hosting: www.hosthorde.com 00:17:55 [INFO]----00:17:55 [INFO] [dynmap] Loaded 21 shaders. 00:17:56 [INFO] [dynmap] Loaded 82 perspectives. 00:17:56 [INFO] [dynmap] Loaded 12 lightings. 00:17:56 [INFO] [dynmap] Web server started on address 0.0.0.0:8123 00:17:56 [INFO] [dynmap] version 0.90-1347 is enabled - core version 0.90-373 00:17:56 [INFO] [dynmap] Loaded 3 maps of world 'world'. 00:17:56 [INFO] [dynmap] Loaded 2 maps of world 'world_nether'. 00:17:56 [INFO] [dynmap] Loaded 2 maps of world 'world_the_end'. 00:17:56 [INFO] [dynmap] Loaded 3 maps of world 'worldsurvival'. 00:17:56 [INFO] [dynmap] Loaded 3 maps of world 'superflat'. 00:17:56 [INFO] [dynmap] Enabled 00:17:56 [INFO] [Essentials] Enabling Essentials v2.9.5 00:17:56 [INFO] Essentials: Using config file enhanced permissions. 00:17:56 [INFO] Permissions listed in as player-commands will be given to all users. 00:17:56 [INFO] [Dynmap-WorldGuard] Enabling Dynmap-WorldGuard v0.30 00:17:56 [INFO] [Dynmap-WorldGuard] initializing 00:17:56 [INFO] [Dynmap-WorldGuard] version 0.30 is activated 00:17:56 [INFO] [EssentialsProtect] Enabling EssentialsProtect v2.9.5 00:17:56 [INFO] Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10] 00:17:57 [INFO] [EssentialsSpawn] Enabling EssentialsSpawn v2.9.5 00:17:57 [INFO] [Multiverse-Portals] Enabling Multiverse-Portals v2.4-b548 00:17:57 [INFO] [Multiverse-Portals] - Version 2.4-b548 Enabled - By Rigby and fernferret 00:17:57 [WARNING] [Multiverse-Portals] Failed Parsing World for: portal_fed (World Error, World did not exist or was not imported into Multiverse-Core!) 00:17:57 [WARNING] [Multiverse-Portals] Portal portal_fed has an invalid LOCATION! 00:17:57 [WARNING] [Multiverse-Portals] Portal 'portal_fed' not loaded due to invalid location! 00:17:57 [INFO] [Multiverse-Portals] 5 - Portals(s) loaded 00:17:57 [INFO] [Multiverse-Inventories] Enabling Multiverse-Inventories v2.5-b207 00:17:57 [INFO] [Multiverse-Inventories 2.5-b207] enabled. 00:17:57 [INFO] [EssentialsChat] Enabling EssentialsChat v2.9.5 00:17:57 [INFO] [EssentialsAntiBuild] Enabling EssentialsAntiBuild v2.9.5 00:17:57 [INFO] Server permissions file permissions.yml is empty, ignoring it 00:17:57 [INFO] Done (6.550s)! For help, type "help" or "?"Hi,
Thank chromerium for you answer, and for the plugin.
I'am sorry, but I still have this : ( http://pastebin.com/fJM4DaQj ) on the lasted beta CB#2488
No other plugin installed :(
Thank again for you plugin, please keep working on it :)
where i have to put the script for server start and how should i call that script.
Yes, +1 for RemyPas's suggestion. Please allow your plugin's in-game text customizable. Locale.
It's working for me like a charm. But could you make the 'server is shutting down' message alterable for me? People keep freaking out on the words shutdown, while it's only a restart.
Would appreciate any feedback people can give me as to how well this plugin is working for people. I see a lot of downloads :) I hope its working out.