Squash bugs in java imports/bedrock imports

This commit is contained in:
amcmanu3 2023-09-03 13:20:02 -04:00
parent f6c61e1764
commit a983cc8868

View File

@ -354,7 +354,7 @@ class Controller:
server_file = create_data["jarfile"] server_file = create_data["jarfile"]
raise NotImplementedError("Not yet implemented") raise NotImplementedError("Not yet implemented")
self.import_helper.import_java_zip_server() self.import_helper.import_java_zip_server()
if create_data["minecraft_java"]: if data["create_type"] == "minecraft_java":
_create_server_properties_if_needed( _create_server_properties_if_needed(
create_data["server_properties_port"], create_data["server_properties_port"],
) )
@ -417,6 +417,7 @@ class Controller:
else: else:
server_command = f"./{create_data['executable']}" server_command = f"./{create_data['executable']}"
logger.debug("command: " + server_command) logger.debug("command: " + server_command)
server_file = create_data["executable"]
elif root_create_data["create_type"] == "import_zip": elif root_create_data["create_type"] == "import_zip":
# TODO: Copy files from the zip file to the new server directory # TODO: Copy files from the zip file to the new server directory
raise NotImplementedError("Not yet implemented") raise NotImplementedError("Not yet implemented")
@ -520,7 +521,7 @@ class Controller:
ServersController.set_import(new_server_id) ServersController.set_import(new_server_id)
self.import_helper.import_jar_server( self.import_helper.import_jar_server(
create_data["existing_server_path"], create_data["existing_server_path"],
os.path.join(new_server_path, server_fs_uuid), new_server_path,
monitoring_port, monitoring_port,
new_server_id, new_server_id,
) )
@ -534,6 +535,7 @@ class Controller:
new_server_path, new_server_id new_server_path, new_server_id
) )
elif root_create_data["create_type"] == "import_server": 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"]) full_exe_path = os.path.join(new_server_path, create_data["executable"])
self.import_helper.import_bedrock_server( self.import_helper.import_bedrock_server(
create_data["existing_server_path"], create_data["existing_server_path"],
@ -543,6 +545,7 @@ class Controller:
new_server_id, new_server_id,
) )
elif root_create_data["create_type"] == "import_zip": 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"]) full_exe_path = os.path.join(new_server_path, create_data["executable"])
self.import_helper.import_bedrock_zip_server( self.import_helper.import_bedrock_zip_server(
create_data["zip_path"], create_data["zip_path"],