[ADMN] AutoStop v0.53 - Auto Stop & Restart Your Server [650-803]

Discussion in 'Inactive/Unsupported Plugins' started by jasonznack, May 14, 2011.

  1. Offline


    Server AutoStop
    Time-Based Scheduled Server Shutdowns and Restarts

    (Maintenance Release Edition)

    NOTE: May not be working properly in CraftBukkit RB 928 with Permissions 3.

    Credit: AutoStop is a plugin originally written by @dv90 and last updated by @Afforess.
    ALL CREDIT GOES TO THEM. I have done nothing, other than make the plugin visible again.

    The Following Is Modified From the Original Thread:

    I. Requirements: Permissions 2.7+ (Optional)

    II. Description: A simple plugin that saves player and chunk data then shuts the server down at a specified time. Great for clearing memory leaks and updating plugins automatically.

    III. Features:
    • Works with Windows AND Linux AND Mac
    • Saves Player Data and Chunk Data before stopping the server
    • Gives a custom warning at specified time before shutting down
    • Quickly shuts server down
    • Uses autostop.properties to specify what time (24-hour clock) it should shutdown
    • Automatically creates the properties file if it doesn't exist
    • Automatically restarts server (if you enable it)
    • Multiple restart times possible
    IV. Installation:

    1. Download the AutoStop.jar listed below and put it in your plugins folder.
    2. Start and Stop the server once to create the Server AutoStop folder and config file.
    3. Edit the config file to suit your needs. See the example below.
    V. Special Notes:

    • The plugin will automatically put AutoRestart.jar in your bukkit directory.
      • Don't run it; it won't do anything.
      • Do not delete or move it.
    • If your server doesn't auto restart, post your restart_log.txt here.
      • If there is no restart_log.txt, you're doing it wrong.
    • If you use a .bat file (server_nogui.bat), set your path to: path=start server_nogui.bat
      • Remember, your server's timezone may be different. Take that into account when setting up your autostop.properties.
    VI. Commands:

    • /reboot - Immediately saves data and restarts the server.
    • /restart - Same as reboot.
    VII. Permissions:

    • Node: autostop.use
    • Don't use the Permissions Plugin? Just OP yourself.
    IIX. Properties File Example:

    Note: It appears there are duplicate properties files created. One in /plugins/AutoStop/and another in /plugins/ServerAutoStop/. Be sure to set your parameters in BOTH FILES.

    stoptime=12:00:00 12:05:00 12:10:00
    # Use 24-hour time. Separate times with a space. [Hour:Minute:Second]
    warntime=0:10 0:30 1:00 5:00 15:00
    # Displays warning this many min:sec before shutting down. Separate with space. [Minutes:Seconds]
    warnmsg=Shutting down...
    # Warning message to display.
    # Enables automatic server restarts. If this is true, path must not be blank.
    path=java -jar craftbukkit.jar
    # Path to server file (including any arguments). This can also be a command if you are using crontab/screen/etc.
    # Linux screen example:
    # path=screen -dmS MinecraftServer java -jar craftbukkit.jar
    IX. Current Release:
    X. Trouble Shooting:
    • Please read this thread before posting. Several tips have been posted that might solve your problem.
    • Also see the old thread first before posting your issues. It's a short thread, so no excuses for not reading first.
    • Original Thread: http://forums.bukkit.org/threads/7425/
    XI. Known Issues:
    • It appears there are duplicate properties files created. One in /plugins/AutoStop/ and another in /plugins/ServerAutoStop/. Be sure to set your parameters in BOTH FILES.
    XII. Change Log:
    • Version 0.53
      • Fixed a few small bugs
      • Kicks all players before shutting down
      • Updated to latest RB
    • Version 0.52
      • Supports multiple warn times now
      • Other small fixes
    Older Change Log (open)

    Version 0.51
    • Fixed a small problem with the syntax of the auto-generated autostop.properties file.
    Version 0.5

    • Multiple stop/restart times
    • Added better support for Windows cmd users
    Version 0.4

    • /reboot and /restart commands
    • Permissions support for commands
    Version 0.3

    • Automatic server restarts
    • Stop/Warn time precision works with seconds now
    Version 0.2

    • Added configurable warning message and warning time
    • Attempted automatic restarts but had no luck; possible in a future release
    Version 0.1

    • Initial Release

    Credit: AutoStop is a plugin originally written by @dv90 and last updated by @Afforess.
    ALL CREDIT GOES TO THEM. I have done nothing, other than make the plugin visible again.
  2. Offline


    I don't use Linux, and I'm not familiar with using screen, but I'll try and help.

    try these
    path= java -jar craftbukkit.jar (note, you can add whatever other line arguments you want in there as well)

    I'm looking at the screen docs and can't see why it wouldn't work either.

    Ok.. idea...

    try putting screen -DmS ms java -jar craftbukkit.jar into serverstart.sh
    put serverstart.sh into your craftbukkit dir
    and then use path=serverstart.sh

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jul 16, 2016
  3. Offline


    Thank you very much for such quick replies and lots of ideas. :) I've tried these various ways. I think it will have to do with something like multiuser being on. As soon as I get it, I'll post it. ;)
  4. Offline


    Yes, please do. I know that it does work for some people, and not for others. It would be cool to know why.
  5. Offline


    Sorry Phaegrus. I just can't seem to get it to work with an already existing screen. Ive read through both threads and tried what I could, but with no luck.
  6. Offline


    Can you start it in a new screen?

    sorry, i'm not really familiar with screen. I understand what it is, but I don't know much about using it at all.

    Look through the earlier posts in this thread, and the previous thread for this plugin linked in the main post and check out some of the linux discussion in there. It may give you an idea.
  7. Offline


    It just runs CB in java, but without a screen attached or doesn't run at all. It also shuts the server down too fast, without issuing save-all and stop. It isn't running once the server is stopped, so it can't pass a complete script properly. If it did, another server would be trying to start, before the other is stopped. When I use a multiuser screen, nothing is being passed to the active screen. I think I'll have better luck with cron and scripts, but thanks for all your help, examples, and advice Phaedrus. :)
  8. Offline


    If I had more time, i'd try digging into the code myself and try and improve it a bit. Maybe in August...
  9. Offline


    I'm having issues with Autostop on CB818:
    13:05:35 [SEVERE] Error occurred while disabling ServerAutoStop v1.0.0 (Is it up to date?): null
    at net.hailxenu.serverautostop.AutoStopPlugin.onDisable(AutoStopPlugin.java:148)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:771)
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:269)
    at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:262)
    at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:123)
    at net.minecraft.server.MinecraftServer.stop(MinecraftServer.java:260)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:341)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
  10. Offline

    Phantom Index

    Same problem. You need to get it so it can run a .sh properly while screened. usually the command for that is "screen bash wahteveritiscalled.sh"
  11. Offline


    I'll see what I can do.

    We're you able to use it before by putting path=screen bash wahteveritiscalled.sh ?
  12. Offline


    Done this today and still no warning message before a automatic restart. Anyone else have this issue? Are we sure its actualy working?
  13. Offline


    It's working for me on windows server 2008 r2. At least it was with bukkit 804. I have only just started testing 818.
  14. Offline

    Phantom Index

    I was only able to use /restart command. It did not reboot the game at all. I'm running a linux CentOS
  15. Offline


    Yeah, this is a complete nogo for me. It throws errors starting up and shutting down, none of the chat hooks work either.

    * Bukkit 818
    * AutoStop v0.53

    This is in Linux, but I'm not sure that matters much.
  16. Offline


    Hmm, it's still working for me on Windows, both restarting manually and the timed restart.

    I guess Linux users can do this:

    Try changing your run.sh to look like this

    while true; do
    java -Xmx2048M -Xms2048M -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui
    sleep 30
    And then in the properties file change enablerestart=false

    Modify the java line to use whatever you start your sever with, be it screen, or whatever.

    That should force it so that whenever the server stops, your sh file will wait 30 seconds and start it again. You won't even be using the autorestart.jar

    Let me know if it works.
  17. Offline

    Phantom Index

    I'll test that out
  18. Offline


    Stupid bb ate my code tags.
  19. Offline

    Phantom Index

    Some way to easily contact to give you info fast?
  20. Offline


    PM me?
  21. Offline

    Phantom Index

    I meant Instant messaging, but w/e

    No this won't work lol.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jul 16, 2016
  22. Offline


    Ok, fixed it.

    while true; do
    java -Xmx2048M -Xms2048M -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui
    sleep 30
  23. Offline


    Any plan on updating to 818? There seems to be an issue with it restarting where it doesn't actually turn back on!
  24. Offline


    It's working fine for me.

    What OS are you using?
    Post the properties file and the way you launch the server.
  25. Offline


    @Phaedrus I'm running through Brohoster and when you run the /stop command the server restarts itself automatically so I left it at that but it's not restarting sometimes and doesn't show the warning! Also could you add a way for me to be able to change the kick message?
  26. Offline


    I'm running this with Bukkit 818 and it restarts just fine except no warning message is ever shown.
  27. Offline


    Id like to suggest dynamic warning messages.
    warnmsg=Server is restarting in %s.
    So we can warn say, 10 minutes before, 5 minutes, 1 minute, 30 seconds.

    Currently testing this plugin on my server, hopefully works well.

    Edit: Stops the server and all but doesn't seem to start it again :confused:
  28. Offline


    I'll put your suggestion on the list.

    Take a look through he thread and see if one of the previously posted solutions solves your problem.
  29. Offline


    Tried this with no luck on Minecraft 1.6.6 and Bukkit 818,

    2011-06-05 22:17:34 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'restart' in plugin ServerAutoStop v1.0.0
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:128)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:281)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:718)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:684)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:677)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:217)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:401)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:311)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
            at net.hailxenu.serverautostop.AutoStopPlugin.onCommand(AutoStopPlugin.java:163)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more

  30. Offline


    Links are dead ?
    edit: no more !

    Anyone know if someone want to continue this plugin ?
  31. Offline


    I'm having issues with 'failed to bind to port' on restart since making the leap to 1.6/818.

    I'll have more details after I work out some more pressing plugin issues, but I just wanted to make anyone else with this issue aware.

Share This Page