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.