-
Notifications
You must be signed in to change notification settings - Fork 6
Simple Instructions: 1.3 Setup (MC 1.16.5 or older, Windows, Start Script)
In this example, we suppose, that you installed the Minecraft server in the directory "C:\servers\Minecraft Server\" and use the Minecraft version 1.16.5 and the Forge version 36.2.23.
First, you create a file named start.cmd in the "C:\servers\Minecraft Server\" directory.
Next, you insert the start script into the start.cmd file:
cd "<Path of your Minecraft server>"
start java -Xmx<Amount of RAM in gigatytes you want to allocate to Minecraft>G -jar forge-<Minecraft version>-<Forge version>.jar
In our example we give the Minecraft server 6 GB RAM to use, with the directory "C:\servers\Minecraft Server\", Minecraft version 1.16.5 and Forge version 36.2.23 it would look like this:
cd "C:\servers\Minecraft Server\"
start java -Xmx6G -jar forge-1.16.5-36.2.23.jar
Last, we have to feed the configuration file named auto_restart-server.toml. It is located in the world\serverconfig directory in the installation directory of your server. In our example, is in the directory "C:\servers\Minecraft Server\world\serverconfig".
In the config file, we have to set use_external_restart_script to false and restart_command to "<Path of your Minecraft server>\\start.cmd". (All "\" have to be "\\".)
#Options for restarting:
[restart]
#Is the server started by an external restart script?
use_external_restart_script = false
#Command that is executed on Server stopped to restart the server. Only called if "[restart, use_external_restart_script]" is false.
restart_command = "<Path of your Minecraft server>\\start.cmd"
In our example, it would look like this:
#Options for restarting:
[restart]
#Is the server started by an external restart script?
use_external_restart_script = false
#Command that is executed on Server stopped to restart the server. Only called if "[restart, use_external_restart_script]" is false.
restart_command = "C:\\servers\\Minecraft Server\\start.cmd"
Now we can start the Minecraft server and the Minecraft server restarts, if you use the /restart command.
After testing that the Minecraft server can restart, we continue configuring the features of the Auto Restart mod, starting with the mod naming Auto Restart feature.
Auto Restart Feature