Is there any way to listen to the Code:java Bukkit.shutdown(); command as I want to create a list of tasks before the server shuts down?
I could but is their a way to run the code before the players are kicked off and make sure its first to run?
If you are using a specific plugin to shut the server down you could listen to something that is executed in the same method. If you have access to the plugin's source code you could run a console command that you can later listen to.
I agree to a shutdown event, I've stumbled over some cases where it would have been quite usefull. onDisable is not always reliable as other plugins or an error may force the plugin to disable without shutting the server down.
MrMag518 so you dont want to store data in memory to file/database when you plugin is beeing disabled?
Yes but not if you use a server wrapper or spigot. So possibly get in some how an server shutdown listener.