-
-
Save rohsyl/743f535a7ec17643e3b3b97e38087e20 to your computer and use it in GitHub Desktop.
Minecraft server launch python script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
u_id = 1000 | |
ram = "8" | |
minimum_ram = "8" | |
screen_name = "WuShaolinsMinecraftServer" | |
java_app_name = "spigot-1.13.2" | |
command = 'screen -dmS ' + screen_name + ' java -Xmx' + ram + 'G -Xms' + minimum_ram + 'G -XX:+UseConcMarkSweepGC -jar ' + java_app_name + '.jar' | |
try: | |
'java --version' | |
except OSError : | |
sys.exit('JAVA is not installed ! Please install it first and then rerun this program') | |
print 'Starting the ' + java_app_name + ' with ' + ram + ' Go RAM' | |
os.system(command) | |
print 'Server started in screen named ' + screen_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment