From 453a1982973a2c6893a69861b49bd0cc31be5593 Mon Sep 17 00:00:00 2001 From: ikunsz666 <3279642466@qq.com> Date: Mon, 1 Jul 2024 18:51:55 +0800 Subject: [PATCH] =?UTF-8?q?1.3-1=20=E4=BF=AE=E5=A4=8D=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E8=BF=90=E8=A1=8C=E7=9B=AE=E5=BD=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index c24e7d6..ca559db 100644 --- a/server.py +++ b/server.py @@ -81,12 +81,16 @@ def run(self): run_command = f'{self.javaPath} -Dfile.encoding=utf-8 -Xmx{self.maxRam} -jar forge-{mcVersion}-{forgeVersion}.jar' console.log(f'Run Command: {run_command}') + workdir = self.path + if self.config.direct_mode: + workdir = '' + output_queue = Queue() input_queue = Queue() process = subprocess.Popen( run_command.split(" "), - cwd=self.path, + cwd=workdir, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,