SOLVED

Discussion in 'Spigot Help' started by EncryptedPixel, Jul 12, 2015.

  1. REMOVED
     
    #1 EncryptedPixel, Jul 12, 2015
    Last edited: Jun 13, 2020
  2. java -Xmx8192M -Xms8192M -jar spigot.jar

    make sure that the -jar parameter is next to the .jar name
     
  3. Ok, I'll try that but when I tried the script from my friend it say the line 'done' was the problem
     
  4. What error does it give?
     
  5. Mmm... i cant see any syntax error. But a question: have you written an echo without parameters?
     
  6. start.sh: line 6: syntax error near unexpected token `done'
    start.sh: line 6: ` done'
     
  7. I didn't write this. About the question what do you mean?
     
  8. An echo instruction should have a parameter.

    Something like: echo "Hello world!"
     
  9. Here's what's wrong with your script:
    • Missing shebang
    • Ludicrous Xms (set it to 1-2G)
    • No indentation
    • You should be using "while true; do"
    • While echo works fine without parameters, putting something like "Server restarting in 5 seconds, press Ctrl-C to interrupt." would possible be helpful.
    Here's what I recommend:
    Code (Text):
    #!/usr/bin/env bash

    while true; do
        java -Xms1G -Xmx6G -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:+CMSParallelRemarkEnabled -XX:MaxGCPauseMillis=30 -XX:TargetSurvivorRatio=90 -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -XX:+UseBiasedLocking -jar paperspigot.jar
        echo "Server restarting in 5 seconds, press Ctrl-C to interrupt."
        sleep 5
    done
    chmod +x and launch as ./scriptName.
    Flags are all explained in my "Optimizing spigot" guide.
     
    • Useful Useful x 1
  10. wow XDD
     
  11. java -Xms8G -Xmx8G -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:+CMSParallelRemarkEnabled -XX:MaxGCPauseMillis=30 -XX:TargetSurvivorRatio=90 -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -XX:+UseBiasedLocking -jar paperspigot.jar
    echo "Server restarting in 5 seconds, press Ctrl-C to interrupt."
    sleep

    My one is correct for 8GB?
     
  12. Like I said, set Xms to 1-2G.
    What happened to the first part of the script?
     
  13. chmod +x and launch as ./scriptName.
    so whats the command?