Skip to content

1.16.x and below scripts

Sydney edited this page Nov 10, 2022 · 1 revision

Windows Sample Script

set MAX_RAM=5G
set JAR=forge-1.12.2-14.23.5.2860.jar
set JAVA="C:\Program Files\Java\jdk1.8.0_322.6\bin\java.exe"

:start
%JAVA% -Xmx%MAX_RAM% -jar %JAR% nogui
echo Restarting in 5...
sleep 1
echo Restarting in 4...
sleep 1
echo Restarting in 3...
sleep 1
echo Restarting in 2...
sleep 1
echo Restarting in 1...
sleep 1
echo Restarting now!...
sleep 1
goto start

Linux Sample Script

export MINECRAFTJAR=forge-1.16.5-36.2.34.jar
export RAM=12G
export JAVA=/home/sweetie/bin/jdk8u332-b09/bin/java

while true;
do

$JAVA -Xmx$RAM -jar $MINECRAFTJAR nogui

echo Restarting in 5...
sleep 1
echo Restarting in 4...
sleep 1
echo Restarting in 3...
sleep 1
echo Restarting in 2...
sleep 1
echo Restarting in 1...
sleep 1

done
Clone this wiki locally