Skip to content

Commit

Permalink
fix: auto connect for 1.20+ (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
jebibot authored Nov 25, 2023
1 parent 16790ca commit cf7fd2f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/assets/js/processbuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit cf7fd2f

Please sign in to comment.