13 lines
506 B
Python
13 lines
506 B
Python
print(colored(colorama.Fore.GREEN,"\nLaunching Minecraft..."))
|
|
if lv["console"] == "1":
|
|
proc = subprocess.Popen([lv["java"]] + args)
|
|
rtn = proc.wait()
|
|
if rtn != 0: print(colored(colorama.Fore.RED,"> Launch failed: ") +"return isn't 0",file=sys.stderr)
|
|
else:
|
|
pkwargs = {
|
|
"stdout": subprocess.DEVNULL,
|
|
"stdin": subprocess.DEVNULL,
|
|
"stderr": subprocess.DEVNULL
|
|
}
|
|
if lv["osName"] == "windows": pkwargs["creationflags"] = 0x00000008
|
|
subprocess.Popen([lv["java"] + "w"] + args,**pkwargs) |