From 76424aba7f819beed5e83d15cc4bc0d62e795414 Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Sat, 4 May 2024 20:29:11 -0400 Subject: [PATCH] Setup forge installs for big bucket --- app/classes/minecraft/bigbucket.py | 3 +-- app/classes/shared/main_controller.py | 5 ++--- app/classes/shared/server.py | 3 ++- app/frontend/templates/server/wizard.html | 7 +------ 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/classes/minecraft/bigbucket.py b/app/classes/minecraft/bigbucket.py index 361d58e9..879dcdd7 100644 --- a/app/classes/minecraft/bigbucket.py +++ b/app/classes/minecraft/bigbucket.py @@ -166,7 +166,6 @@ class BigBucket: notifies server users about the completion of the download. Parameters: - - jar (str): The name of the JAR file to download. - server (str): The type of server software (e.g., 'forge', 'paper'). - version (str): The version of the server software. - path (str): The local filesystem path where the JAR file will be saved. @@ -208,7 +207,7 @@ class BigBucket: # Post-download actions if success: - if server == "forge": + if server == "forge-installer": # If this is the newer Forge version, run the installer ServersController.finish_import(server_id, True) else: diff --git a/app/classes/shared/main_controller.py b/app/classes/shared/main_controller.py index 306e951f..41d1bc54 100644 --- a/app/classes/shared/main_controller.py +++ b/app/classes/shared/main_controller.py @@ -436,7 +436,7 @@ class Controller: if root_create_data["create_type"] == "download_jar": if Helpers.is_os_windows(): # Let's check for and setup for install server commands - if create_data["type"] == "forge": + if create_data["type"] == "forge-installer": server_command = ( f"java -Xms{Helpers.float_to_string(min_mem)}M " f"-Xmx{Helpers.float_to_string(max_mem)}M " @@ -449,7 +449,7 @@ class Controller: f'-jar "{server_file}" nogui' ) else: - if create_data["type"] == "forge": + if create_data["type"] == "forge-installer": server_command = ( f"java -Xms{Helpers.float_to_string(min_mem)}M " f"-Xmx{Helpers.float_to_string(max_mem)}M " @@ -574,7 +574,6 @@ class Controller: url = self.big_bucket.get_fetch_url( create_data["type"], create_data["version"] ) - print(url) server_obj.executable_update_url = url self.servers.update_server(server_obj) self.big_bucket.download_jar( diff --git a/app/classes/shared/server.py b/app/classes/shared/server.py index a31cc891..a6c98b89 100644 --- a/app/classes/shared/server.py +++ b/app/classes/shared/server.py @@ -690,7 +690,8 @@ class ServerInstance: try: # Getting the forge version from the executable command version = re.findall( - r"forge-([0-9\.]+)((?:)|(?:-([0-9\.]+)-[a-zA-Z]+)).jar", + r"forge-installer-([0-9\.]+)((?:)|" + r"(?:-([0-9\.]+)-[a-zA-Z]+)).jar", server_obj.execution_command, ) version_param = version[0][0].split(".") diff --git a/app/frontend/templates/server/wizard.html b/app/frontend/templates/server/wizard.html index e3e052af..c05329c9 100644 --- a/app/frontend/templates/server/wizard.html +++ b/app/frontend/templates/server/wizard.html @@ -20,11 +20,6 @@
- {% if data["server_api"] and data["online"] %} - - {% end %}

{{ translate('serverWizard', 'newServer', data['lang']) }}


@@ -1128,7 +1123,7 @@ function wait_msg(importing) { bootbox.alert({ title: importing ? '{% raw translate("serverWizard", "importing", data["lang"]) %}' : '{% raw translate("serverWizard", "downloading", data["lang"]) %}', - message: importing ? ' {% raw translate("serverWizard", "bePatient", data["lang"]) %}' : ' {% raw translate("serverWizard", "bePatient", data["lang"]) %}

Powered by serverjars.com', + message: importing ? ' {% raw translate("serverWizard", "bePatient", data["lang"]) %}' : ' {% raw translate("serverWizard", "bePatient", data["lang"]) %}', }); }