mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FEATURE] Support 1.20+ autoenter
This commit is contained in:
parent
2792b5a008
commit
fca2ed2447
1 changed files with 6 additions and 2 deletions
|
@ -112,8 +112,12 @@ private void addModernClientArgs(Collection<String> args) {
|
|||
|
||||
// Add server args
|
||||
if (autoEnter) {
|
||||
Collections.addAll(args, "--server", profile.getServerAddress());
|
||||
Collections.addAll(args, "--port", Integer.toString(profile.getServerPort()));
|
||||
if (version.compareTo(ClientProfileVersions.MINECRAFT_1_20) <= 0) {
|
||||
Collections.addAll(args, "--server", profile.getServerAddress());
|
||||
Collections.addAll(args, "--port", Integer.toString(profile.getServerPort()));
|
||||
} else {
|
||||
Collections.addAll(args, "--quickPlayMultiplayer", String.format("%s:%d", profile.getServerAddress(), profile.getServerPort()));
|
||||
}
|
||||
}
|
||||
for (OptionalAction a : actions) {
|
||||
if (a instanceof OptionalActionClientArgs) {
|
||||
|
|
Loading…
Reference in a new issue