diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a9c9fc6..97c4cf70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ TBD - Make sure default.json is read from correct location ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/714)) - Do not allow users at server limit to clone servers ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/718)) - Fix bug where you cannot get to config with unloaded server ([Commit](https://gitlab.com/crafty-controller/crafty-4/-/commit/9de08973b6bb2ddf91283c5c6b0e189ff34f7e24)) +- Fix forge install v1.20, 1.20.1 and 1.20.2 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/710)) ### Tweaks - Bump pyOpenSSL & cryptography for CVE-2024-0727, CVE-2023-50782 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/716)) ### Lang diff --git a/app/classes/shared/server.py b/app/classes/shared/server.py index 812cedce..8d07af23 100644 --- a/app/classes/shared/server.py +++ b/app/classes/shared/server.py @@ -696,6 +696,10 @@ class ServerInstance: version_param = version[0][0].split(".") version_major = int(version_param[0]) version_minor = int(version_param[1]) + if len(version_param) > 2: + version_sub = int(version_param[2]) + else: + version_sub = 0 # Checking which version we are with if version_major <= 1 and version_minor < 17: @@ -729,8 +733,8 @@ class ServerInstance: server_obj.execution_command = execution_command Console.debug(SUCCESSMSG) - elif version_major <= 1 and version_minor < 20: - # NEW VERSION >= 1.17 and <= 1.20 + elif version_major <= 1 and version_minor <= 20 and version_sub < 3: + # NEW VERSION >= 1.17 and <= 1.20.2 # (no jar file in server dir, only run.bat and run.sh) run_file_path = "" @@ -777,7 +781,7 @@ class ServerInstance: server_obj.execution_command = execution_command Console.debug(SUCCESSMSG) else: - # NEW VERSION >= 1.20 + # NEW VERSION >= 1.20.3 # (executable jar is back in server dir) # Retrieving the executable jar filename