From cf7fd2f4113cc32d405277c50edec62dfb228937 Mon Sep 17 00:00:00 2001 From: jebibot <83044352+jebibot@users.noreply.github.com> Date: Sun, 26 Nov 2023 08:29:09 +0900 Subject: [PATCH] fix: auto connect for 1.20+ (#316) --- app/assets/js/processbuilder.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/assets/js/processbuilder.js b/app/assets/js/processbuilder.js index b86698c..18c48fb 100644 --- a/app/assets/js/processbuilder.js +++ b/app/assets/js/processbuilder.js @@ -307,10 +307,15 @@ class ProcessBuilder { _processAutoConnectArg(args){ if(ConfigManager.getAutoConnect() && this.server.rawServer.autoconnect){ - args.push('--server') - args.push(this.server.hostname) - args.push('--port') - args.push(this.server.port) + if(mcVersionAtLeast('1.20', this.server.rawServer.minecraftVersion)){ + args.push('--quickPlayMultiplayer') + args.push(`${this.server.hostname}:${this.server.port}`) + } else { + args.push('--server') + args.push(this.server.hostname) + args.push('--port') + args.push(this.server.port) + } } }