Skip to content

Instantly share code, notes, and snippets.

@timbru31
Last active September 8, 2016 09:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timbru31/1d87f2ae955073705677 to your computer and use it in GitHub Desktop.
Save timbru31/1d87f2ae955073705677 to your computer and use it in GitHub Desktop.
Minecraft Server start script (Windows)
@echo off
title MC 1.10.2 Server DEV
:: set folder
set BINDIR=%~dp0
cd /D "%BINDIR%"
:: initial variables
set java=8
set jar=craftbukkit
:: question
echo Please choose between CraftBukkit, Spigot and PaperSpigot
echo S Spigot
echo C CraftBukkit (Standard)
echo P PaperSpigot
echo.
:: choices
choice /c SCP /t 10 /d C
if "%errorlevel%" == "1" set jar=spigot
if "%errorlevel%" == "2" set jar=craftbukkit
if "%errorlevel%" == "3" set jar=paper
:: java question
echo.
echo Please choose between Java 7 and 8
echo 7 Java 7
echo 8 Java 8 (Standard)
echo.
:: java choice
choice /c 78 /t 5 /d 8
if "%errorlevel%" == "1" set java=7
if "%errorlevel%" == "2" set java=8
:: START
::-XX:MaxPermSize=256M
cls
if %java% == 8 (
"%ProgramFiles%\Java\jre1.8.0_101\bin\java.exe" -Dcom.sun.management.jmxremote -Xincgc -Xmx4G -jar %jar%.jar
) else (
"%ProgramFiles%\Java\jre%java%\bin\java.exe" -Dcom.sun.management.jmxremote -Xincgc -Xmx4G -XX:MaxPermSize=256M -jar %jar%.jar
)
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment