Auto Shutdown / Restart
PLUGIN TESTED WITH 1.8.1!!!
Plugin Version: 3.2.1 Minecraft/Bukkit Version: 1.5.1 (Tested with 1.8.1)
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.
Look at our Examples here...
Restart scripts
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.
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.
- The warning message is configurable.
- All connected users can be kicked from the server before the shutdown.
- Server can be automatically restarted when the plugin shutdowns the server via restart script (server start file change).
- Server can be automatically restarted at a certain time after the plugin shutdowns the server via Scheduled Tasks (windows program).
Link Removed: http://www.mediafire.com/?b9elixc9fb1hie7
Requirements:
- SuperPerms/PermissionsEX 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 t 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.
A commented 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
The default config file can be found here
- 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.- working!
- kickonshutdown - kick users before shutting the server down. (Better than an end of stream error) - working!
- 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
- Shutdown message - the message shown in chat when warn times are displayed
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. Currently partial disabled due to a bug
- /as set now - set the shutdown schedule to shut down within 60 seconds
- /as list - lists what the currently configured shutdown times are
VIDEOS! :D
Spainish Tutorial (Tested on spigot 1649)
Credit for the spanish tutorial goes to MaxMar628
All credit goes to chromerium who created the mod up until MC vr. 1.3.1
@BrandonDaBeast
I have created a ticket and will implement this idea hopefully by the next build... Thanks for your input, Fireant456
This plugin would be complete to me if you could make it to were it would restart automatically and you could have different shutdown times on each day of the week.
@teh_jombi
YES I STILL NEED HELP! PM me a skype name I can use to talk to you on...
@fireant456
I can help if you still need it.
@wolfenit415
I'm aware of the issue but I don't code I'm just here releasing what I found... =P sorry...
If anyone that codes wants to help with the AutoShutdown project please PM me!!
Thanks, Fireant456
Okay so the only thing i noticed that does not work is the kick reason. When people are disconnected for the shutdown it says only "Server Closed". My kick reason: The server is restarting. Please help me fix.
Your a hero man A FRICKIN HERO! If everyone uses a restart script this is perfect. Thanks you saved my sanity. I have a 24 hour server running in my house on a unused pc and even though the server is allowed to use 4 gbs out of eight once that reaches its mark things get a lil crazy and this is perfect! Every server should be running this. It saves so much hassle for players and owners alike. Again thank you. Please keep this thing working.
Going to give this a try if it works ill thank and pray for you man. I was using simple restart and they bounced on us man. They haven't logged on in like 3 months and don't care anymore man!
I really dont know why this isnt working, no other plugins installed
2012-08-10 09:33:15 [INFO] Starting minecraft server version 1.3.1 2012-08-10 09:33:15 [INFO] Loading properties 2012-08-10 09:33:15 [INFO] Default game type: SURVIVAL 2012-08-10 09:33:15 [INFO] Generating keypair 2012-08-10 09:33:16 [INFO] Starting Minecraft server on *:25565 2012-08-10 09:33:16 [INFO] This server is running CraftBukkit version git-Bukkit-1.3.1-R1.0-b2320jnks (MC: 1.3.1) (Implementing API version 1.3.1-R1.0) 2012-08-10 09:33:16 [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:155) 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:222) at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:198) at net.minecraft.server.ServerConfigurationManagerAbstract.<init>(ServerConfigurationManagerAbstract.java:50) at net.minecraft.server.ServerConfigurationManager.<init>(SourceFile:11) at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:105) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:380) at net.minecraft.server.ThreadServerApplication.run(SourceFile:539) 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(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:144) ... 9 more 2012-08-10 09:33:16 [INFO] Preparing level "world" 2012-08-10 09:33:16 [INFO] Preparing start region for level 0 (Seed: -423063416729912868) 2012-08-10 09:33:17 [INFO] Preparing start region for level 1 (Seed: -423063416729912868) 2012-08-10 09:33:17 [INFO] Preparing spawn area: 16% 2012-08-10 09:33:18 [INFO] Server permissions file permissions.yml is empty, ignoring it 2012-08-10 09:33:18 [INFO] Done (1.899s)! For help, type "help" or "?" 2012-08-10 09:33:18 [INFO] CONSOLE: Stopping the server..[m 2012-08-10 09:33:18 [INFO] Stopping server 2012-08-10 09:33:18 [INFO] Saving players 2012-08-10 09:33:18 [WARNING] DSCT: socket closed 2012-08-10 09:33:18 [INFO] Saving worlds 2012-08-10 09:33:18 [INFO] Closing listening thread 2012-08-10 09:33:18 [INFO] Saving chunks for level 'world'/net.minecraft.server.WorldProviderNormal@67c1a6 2012-08-10 09:33:19 [INFO] Saving chunks for level 'world_nether'/net.minecraft.server.WorldProviderHell@120b2da
Thank you for releasing this. I will definitely download + use this once the file is ready :)
I was using a similar plugin but it just stopped working after 1.3.1.
The file is waiting for approval?