Filled Dev needed! Auto restart plugin. Custom

Discussion in 'Archived: Plugin Requests' started by pilot3101, Oct 6, 2013.

  1. Offline

    klosjaarrr

    AndyMcB1 Oops, forgot to edit that in the code :oops:
     
  2. Offline

    pilot3101

    So do I change everything in my run.bat to that code and it will work?
     
  3. Offline

    timtower Administrator Administrator Moderator

  4. Offline

    pilot3101

    So which code do I put in? There is so many!!
     
  5. Offline

    whitehooder

    Your batch file is overly complicated.

    Change this:
    Code:
    @Echo OFF
    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xmx1024M -Xms1024M -jar craftbukkit-1.6.4-R0.1-20130923.182200-5.jar
    PAUSE
    to this:
    Code:
    :startPoint
    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xmx1024M -Xms1024M -jar craftbukkit-1.6.4-R0.1-20130923.182200-5.jar
    goto startPoint
    The first line simply sets a point in the batch file where the goto can send you back, which means, whenever the server is done running (stopped by a plugin) it will go back to startPoint ("goto startPoint") and start the server once again. To stop this cycle you will have to close the command prompt.

    If you are wondering about what this line does:
    Code:
    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xmx1024M -Xms1024M -jar craftbukkit-1.6.4-R0.1-20130923.182200-5.jar
    The first thing enclosed in double quotation marks finds the java.exe file stored in your ProgramFiles folder. The first two arguments after that, sets the maximum and minimum (x and s after -Xm) amount of RAM your server can use (1024 Megabytes). -jar simply tells java that it you want to run a jar file, then the jar file, which is your server is stated (craftbukkit-...). If you ever plan to upgrade your server, the numbers will change, and you will have to change this to the new filename. I usually rename all the files I download to craftbukkit.jar so that I don't have to update my startup script every single time.
     
  6. Offline

    timtower Administrator Administrator Moderator

    Try one?
     
  7. Offline

    pilot3101

    I just downloaded a plugin. It works
     
  8. Offline

    klosjaarrr


    If you would do what everyone here suggested to you, it would work too and even 'better'. I would really try to have as less plugins as possible if I were you, so you might want to give our method(s) a shot too. Anyway, please mark this thread as 'Filled'. :)
     
  9. Offline

    pilot3101

    So im trying to stop the server like quit the server but it just restarts again. Is there a way to shut it down?
     
  10. Offline

    timtower Administrator Administrator Moderator

    Depends on the plugin that you are using, that I why I always have a 30 second countdown on my own scripts before it runs again, so you can shut it down
     
  11. Offline

    pilot3101

  12. Offline

    AndyMcB1

  13. Offline

    pilot3101

    So how do i shutdown my server? When ever i do /stop, it just restarts because of the loop in the run.bat
     
  14. Offline

    JPG2000

    pilot3101 When you say "Custom for me" you mean...? %100 for you?
     
  15. Offline

    pilot3101

    No i mean i dont want it that someone else made it. I want it from scratch.
     
  16. Offline

    JPG2000

    pilot3101 No offense, but thats kind of given, because its a Plugin Request. Also, what do you mean by scratch. All plugins are coded by scratch?
     
  17. Offline

    AndyMcB1

    /stop and close the command prompt
     
    timtower likes this.
  18. Offline

    timtower Administrator Administrator Moderator

    And why?
    Post your run.bat again and I will modify it with an 30 second timer for you
     
  19. Offline

    Mathias Eklund

    Is this not solved yet?
     
  20. Offline

    AndyMcB1

    Unfortunately not.
     
    timtower likes this.
  21. Offline

    Mathias Eklund

    as i recall, when this post was made, he got the solution pretty quick.
     
  22. Offline

    AndyMcB1

    He asked (today) another question relating to this.
     
  23. Offline

    timtower Administrator Administrator Moderator

  24. Offline

    pilot3101

    Uhh no it is solved. Lol. Thanks though. I had this solved.
     

Share This Page