mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-01 14:04:03 +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
|
// Add server args
|
||||||
if (autoEnter) {
|
if (autoEnter) {
|
||||||
Collections.addAll(args, "--server", profile.getServerAddress());
|
if (version.compareTo(ClientProfileVersions.MINECRAFT_1_20) <= 0) {
|
||||||
Collections.addAll(args, "--port", Integer.toString(profile.getServerPort()));
|
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) {
|
for (OptionalAction a : actions) {
|
||||||
if (a instanceof OptionalActionClientArgs) {
|
if (a instanceof OptionalActionClientArgs) {
|
||||||
|
|
Loading…
Reference in a new issue