From 21fb9f1286e18c405df5bbcb40b6ede07fb70c6d Mon Sep 17 00:00:00 2001 From: Charles Le Maux Date: Mon, 16 Sep 2024 01:52:27 +0200 Subject: [PATCH] [~] Coding style --- server_mc_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server_mc_manager.py b/server_mc_manager.py index ea534ba..6aab6e9 100644 --- a/server_mc_manager.py +++ b/server_mc_manager.py @@ -21,7 +21,8 @@ class MinecraftServerManager: self.offline_ports: list[int] = [] def start_server(self, server_directory: str, port: int, user_id: str, server_name: str, - version: str, jar_file: str = 'server.jar', memory_size: str ='4G', modded: bool = False) -> Union[int, None]: + version: str, jar_file: str = 'server.jar', + memory_size: str ='4G', modded: bool = False) -> Union[int, None]: if port in self.servers: return None @@ -40,6 +41,7 @@ class MinecraftServerManager: command = f"{java} -Xmx{memory_size} {reg_flags} -jar {jar_file} --nogui" if modded: command = "./start.sh" + process = subprocess.Popen(shlex.split(command), cwd=server_directory, stdin=subprocess.PIPE) #TODO: Track process behavior and stderr, while excepting Advanced Terminal features not to be avail.