(NEED HELP)

Discussion in 'Plugin Development' started by Crowdy199(9), May 25, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Crowdy199(9)

    GUYS PLZ HELP I AM LOOKING FOR A PLUGIN FOR MY SERVER THAT SHUTS IT DOWN AND STARTS IT BACK UP EVERY 3HR (RESTART PLUGIN) BUT EVERY PLUGIN I FOUND SHUTS IT DOWN BUT DOESN T TURN IT BACK ON
     
  2. First, use a descriptive title, "need help" doesn't help me understand your problem and it makes people ignore your post.
    Second, don't use ALL CAPS because it's annoying.

    Now, plugins can't start the server back because they're removed from memory once the server is shut down.

    What you need is a script... if you're running windows, a batch script "start.bat" or something, would be fairly easy to make:
    Code:
    @echo off
    cls
    
    :restart
    start "Minecraft Server" /wait /B /high java -Xmx1024M -Xms1024M -jar craftbukkit.jar
    echo Server stopped, restarting...
    goto restart
    That basically re-starts the server whenever it closes, by crashes, shutdown or whatever... you'd have to close the script first to stop the server for good.
    Also, it starts it as high priority with 1GB memory allocated, you might want to change those.
    Don't remove the title, you can change it tough.

    For unix based systems I have no clue.
     
  3. Offline

    Crowdy199(9)

    thanks man

    wait so is that the exact code i need to shut the server down every 3hrs and and start it back up

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  4. Basically yes.... paste it in a "start.bat" file and start the server using that.... but change the jar name accordingly.
     
  5. Offline

    Crowdy199(9)

    can we make it so it stops the server using the command stop
     
  6. For stopping you should use a plugin.
     
  7. Offline

    russjr08

    Doesn't bukkit already allow you to type "stop" to stop the server? Or does the script not allow for commands? Then you could do /stop in-game.
     
  8. russjr08 "stop" stops the server at that exact moment, he wants to stop it after 3 hours automatically.
     
  9. Offline

    russjr08

  10. It seems there is a plugin that "restarts" the server, but it's using the same method I suggested, scripts :} python for unix and batch for linux, Crowdy199(9) you should use SimpleRestart.
     
  11. Offline

    russjr08

    I'm sure theres also a cron job you could setup too. For his purpose though it seems like it'd just be a good idea to use SimpleRestart.
     
Thread Status:
Not open for further replies.

Share This Page