I need Code Runserver auto


#1

My server , server close auoto

i need code : auto run

help me pls :frowning:


#2

So what your saying is you want your server to automatically run after it has been shutdown?


#3

yes , i want code automatically run


#4

2 ways of doing this.

  1. (the safest and easiest way) use a restart plugin
  2. get the launch script to re-execute itself

The restart plugin will not restart on server close, just on restart command, this is safer as you can actually properly turn off your server without force killing the server.
Option 2 will automaticly reboot the server when it closes in anyway possible

Which would you prefer?


#5

@ECHO OFF
color f
SET BINDIR=%~dp0
CD /D “%BINDIR%”
:start
java -Xms37G -Xmx37G -jar forge-1.12.2-14.23.4.2705-universal.jar nogui
GOTO start


#6

ok, so Windows Batch Script.
This code worked for me on Sponge Vanilla

color f
:loop
    java -jar spigot.jar
goto loop