Discussion in 'Spigot Discussion' started by ItsPhill, Apr 16, 2019.

  1. hi, I'm getting some error whith a minecraft server start "script"
    the error is: " goto: not found"
    the script is:


    java -Xms4G -Xmx4G -Dlog4j.configurationFile=log4j2.xml -jar spigot.jar -o true

    timeout 10

    echo resuming server...

    goto begin


    Can you help me?
  2. Choco


    Well the goto here is entirely useless, for one. You could just do this following and have it work just the same
    Code (Windows Batch file):
    java -Xms4G -Xmx4G -Dlog4j.configurationFile=log4j2.xml -jar spigot.jar -o true
    timeout 10
    echo resuming server...
  3. Hi, but when I am going to do "stop" it dont auto restart
    #3 ItsPhill, Apr 16, 2019
    Last edited: Apr 16, 2019
  4. Choco


    To my knowledge, it won't restart when /stop is performed, only when the server crashes (if enabled in the spigot.yml) or if /restart is executed.
  5. `goto` is a windows thing that's not available in bash scripts. You can use a while loop instead:
    Code (Text):
    while true
        sleep 5
  6. I tried but when im going to start the server it gives me Error:
    Syntax error:"done" unexpected (expecting "do")
  7. When you start your server use a script like this,

    @Echo off
    java -server -d64 -Xms6144M -Xmx8192M -jar spigot-1.13.2.jar
    goto start

    The server will auto restart upon crash or if a reboot is requested.
    • Funny Funny x 1
  8. Its giving me error on goto: not found I have a Linux Ubuntu vps
  9. Strahan


    Yea, as mentioned before there is no "goto" in bash.
  10. how I can resolve it?