Fix Forge Install bug for 1.20, 1.20.1 and 1.20.2

This commit is contained in:
Silversthorn 2024-02-09 00:10:26 +01:00
parent 8e199dcd67
commit 1b05562a9e

View File

@ -697,6 +697,10 @@ class ServerInstance:
version_param = version[0][0].split(".") version_param = version[0][0].split(".")
version_major = int(version_param[0]) version_major = int(version_param[0])
version_minor = int(version_param[1]) version_minor = int(version_param[1])
if version_param.length > 2:
version_sub = int(version_param[2])
else:
version_sub = 0
# Checking which version we are with # Checking which version we are with
if version_major <= 1 and version_minor < 17: if version_major <= 1 and version_minor < 17:
@ -730,8 +734,8 @@ class ServerInstance:
server_obj.execution_command = execution_command server_obj.execution_command = execution_command
Console.debug(SUCCESSMSG) Console.debug(SUCCESSMSG)
elif version_major <= 1 and version_minor < 20: elif version_major <= 1 and version_minor <= 20 and version_sub < 3:
# NEW VERSION >= 1.17 and <= 1.20 # NEW VERSION >= 1.17 and <= 1.20.2
# (no jar file in server dir, only run.bat and run.sh) # (no jar file in server dir, only run.bat and run.sh)
run_file_path = "" run_file_path = ""