From a983cc88687c566d63db056182951f2b20805266 Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Sun, 3 Sep 2023 13:20:02 -0400 Subject: [PATCH] Squash bugs in java imports/bedrock imports --- app/classes/shared/main_controller.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/classes/shared/main_controller.py b/app/classes/shared/main_controller.py index eb067e7e..52e98138 100644 --- a/app/classes/shared/main_controller.py +++ b/app/classes/shared/main_controller.py @@ -354,7 +354,7 @@ class Controller: server_file = create_data["jarfile"] raise NotImplementedError("Not yet implemented") self.import_helper.import_java_zip_server() - if create_data["minecraft_java"]: + if data["create_type"] == "minecraft_java": _create_server_properties_if_needed( create_data["server_properties_port"], ) @@ -417,6 +417,7 @@ class Controller: else: server_command = f"./{create_data['executable']}" logger.debug("command: " + server_command) + server_file = create_data["executable"] elif root_create_data["create_type"] == "import_zip": # TODO: Copy files from the zip file to the new server directory raise NotImplementedError("Not yet implemented") @@ -520,7 +521,7 @@ class Controller: ServersController.set_import(new_server_id) self.import_helper.import_jar_server( create_data["existing_server_path"], - os.path.join(new_server_path, server_fs_uuid), + new_server_path, monitoring_port, new_server_id, ) @@ -534,6 +535,7 @@ class Controller: new_server_path, new_server_id ) elif root_create_data["create_type"] == "import_server": + ServersController.set_import(new_server_id) full_exe_path = os.path.join(new_server_path, create_data["executable"]) self.import_helper.import_bedrock_server( create_data["existing_server_path"], @@ -543,6 +545,7 @@ class Controller: new_server_id, ) elif root_create_data["create_type"] == "import_zip": + ServersController.set_import(new_server_id) full_exe_path = os.path.join(new_server_path, create_data["executable"]) self.import_helper.import_bedrock_zip_server( create_data["zip_path"],