Skip to content

Commit

Permalink
fix: auto connect for 1.20+ (dscalzi#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
jebibot authored and san-antonio0978 committed Feb 29, 2024
1 parent 1dad03c commit a9acb80
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 a9acb80

Please sign in to comment.