Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. @if NOT "%FTB_VERBOSE%"=="yes" (
  2. @echo off
  3. )
  4.  
  5. call settings.bat
  6.  
  7. if NOT EXIST %JARFILE% (
  8. goto install
  9. )
  10. if NOT EXIST libraries\%LAUNCHWRAPPER% (
  11. goto install
  12. )
  13. goto skipinstall
  14.  
  15. :install
  16. echo running install script!
  17. call FTBInstall.bat
  18. :skipinstall
  19.  
  20. REM Check if java in path
  21. REM TODO: use %JAVACMD%
  22. where java > NUL 2>&1
  23.  
  24. REM Test JVM
  25. REM e.g. 32-bit JVM does not have server\jvm.dll library
  26. java -server -version > java-test.log 2>&1
  27.  
  28. if %ERRORLEVEL% NEQ 0 (
  29. echo Detected following JVM error:
  30. echo =======================================
  31. more java-test.log
  32. echo =======================================
  33. echo JVM test failed. Can't run server, Exiting...
  34. pause
  35. exit /B
  36. )
  37.  
  38. if not exist eula.txt (
  39. echo Missing eula.txt. Startup will fail and eula.txt will be created
  40. echo Make sure to read eula.txt before playing!
  41. goto startserver
  42. )
  43.  
  44. find "eula=false" eula.txt 1 > NUL 2>&1
  45. if %ERRORLEVEL% EQU 0 (
  46. echo Make sure to read eula.txt before playing! Exiting.
  47. pause
  48. exit /B
  49. )
  50.  
  51. del /f /q autostart.stamp > nul 2>1
  52.  
  53. :startserver
  54. echo Starting server
  55. java -server -Xms%MIN_RAM% -Xmx%MAX_RAM% -XX:PermSize=%PERMGEN_SIZE% %JAVA_PARAMETERS% -jar %FORGEJAR% nogui
  56.  
  57. :server_loop
  58. if exist autostart.stamp (
  59. del /f /q autostart.stamp > nul 2>1
  60. echo If you want to completely stop the server process now, press Ctrl+C before the time is up!
  61. for /l %%i in (5,-1,1) do (
  62. echo Restarting server in %%i
  63. choice /t 1 /d y > nul
  64. )
  65. echo Starting server now
  66. java -server -Xms%MIN_RAM% -Xmx%MAX_RAM% -XX:PermSize=%PERMGEN_SIZE% %JAVA_PARAMETERS% -jar %FORGEJAR% nogui
  67. echo Server process finished
  68. goto :server_loop
  69. )
  70. echo Exiting...
  71. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement