Skip to content

Commit f8baa36

Browse files
jebibotbusybox11
authored andcommitted
fix: auto connect for 1.20+ (dscalzi#316)
1 parent 61c14b3 commit f8baa36

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

app/assets/js/processbuilder.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,15 @@ class ProcessBuilder {
307307

308308
_processAutoConnectArg(args){
309309
if(ConfigManager.getAutoConnect() && this.server.rawServer.autoconnect){
310-
args.push('--server')
311-
args.push(this.server.hostname)
312-
args.push('--port')
313-
args.push(this.server.port)
310+
if(mcVersionAtLeast('1.20', this.server.rawServer.minecraftVersion)){
311+
args.push('--quickPlayMultiplayer')
312+
args.push(`${this.server.hostname}:${this.server.port}`)
313+
} else {
314+
args.push('--server')
315+
args.push(this.server.hostname)
316+
args.push('--port')
317+
args.push(this.server.port)
318+
}
314319
}
315320
}
316321

0 commit comments

Comments
 (0)