fix: auto connect for 1.20+ (#316)

experiment-overhaul
jebibot 2023-11-26 08:29:09 +09:00 committed by GitHub
parent 16790ca416
commit cf7fd2f411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 4 deletions

View File

@ -307,10 +307,15 @@ class ProcessBuilder {
_processAutoConnectArg(args){ _processAutoConnectArg(args){
if(ConfigManager.getAutoConnect() && this.server.rawServer.autoconnect){ if(ConfigManager.getAutoConnect() && this.server.rawServer.autoconnect){
args.push('--server') if(mcVersionAtLeast('1.20', this.server.rawServer.minecraftVersion)){
args.push(this.server.hostname) args.push('--quickPlayMultiplayer')
args.push('--port') args.push(`${this.server.hostname}:${this.server.port}`)
args.push(this.server.port) } else {
args.push('--server')
args.push(this.server.hostname)
args.push('--port')
args.push(this.server.port)
}
} }
} }