[Batch Tool] Improved Startup Command [For Windows]

Discussion in 'Bukkit Tools' started by EnderTroll68, Aug 18, 2014.

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

    EnderTroll68

    Hello Bukkit Forums!

    I used my and my friend's batch skills in combination with the original post found HERE to make this command that you can put into your .bat file to start up your server. Instructions are found below. Credit for the bulk of the code goes to the guy in the link, thanks Airbornz. If you guys want anything else added to this, post it below in the comments.

    Instructions:
    1. Create a new text document (right click in windows explorer and hit new>text document). Open it in whatever text editor you want, by default it is notepad.​
    2. Paste in the code found below.​
    3. Save the file as whatever you want, I usually do startup.bat, but it is totally up to you. Just make sure the file ending is ".bat"​
    4. Move the ".bat" file you made into your server folder.​
    5. Rename your craftbukkit jar to "craftbukkit.jar". This is very important, because if it is not named that, the code will not work.​
    6. Double click on the file, or run it however you want, and follow the instructions in the window! It is fairly straightforward.​
    Code:
    @echo off
     
    :core
    cls
    echo.
    echo Press Any Key To Start The Server.
    pause > nul
    goto launch
     
    :launch
    cls
    echo.
    echo -------Start Of Server Console-------
    java -Xmx1024M -jar craftbukkit.jar -o true
    goto shutdown
     
    :shutdown
    echo -------End Of Server Console-------
    echo.
    echo The Server Has Stopped!
    echo Check The Details Above!
    :statement
    set /p input=Restart? (y/n)
    if %input% == y (
    goto core
    )
    if %input% == n (
    goto end
    )
    if %input% NEQ y (
    echo That is neither a y nor an 'n'.
    cls
    goto statement
    )
     
    :end
    pause > nul
    exit
    Hope you enjoy this as much as I do, and as always, happy mining!

    ~EnderTroll68

    Saving this post in case I want to add something in the future

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  2. Offline

    Airbornz

    Thanks for the credit! Like it.
     
Thread Status:
Not open for further replies.

Share This Page