|
60 | 60 |
|
61 | 61 | public final class HMCLGameRepository extends DefaultGameRepository { |
62 | 62 | private final Profile profile; |
63 | | - private QuickPlayOption quickPlayOption; |
64 | 63 |
|
65 | 64 | // local version settings |
66 | 65 | private final Map<String, VersionSetting> localVersionSettings = new HashMap<>(); |
@@ -111,13 +110,6 @@ public Stream<Version> getDisplayVersions() { |
111 | 110 | .thenComparing(v -> VersionNumber.asVersion(v.getId()))); |
112 | 111 | } |
113 | 112 |
|
114 | | - public QuickPlayOption getQuickPlayOption() { |
115 | | - return quickPlayOption; |
116 | | - } |
117 | | - |
118 | | - public void setQuickPlayOption(QuickPlayOption quickPlayOption) { |
119 | | - this.quickPlayOption = quickPlayOption; |
120 | | - } |
121 | 113 |
|
122 | 114 | @Override |
123 | 115 | protected void refreshVersionsImpl() { |
@@ -397,6 +389,11 @@ public void globalizeVersionSetting(String id) { |
397 | 389 | } |
398 | 390 |
|
399 | 391 | public LaunchOptions getLaunchOptions(String version, JavaRuntime javaVersion, Path gameDir, List<String> javaAgents, List<String> javaArguments, boolean makeLaunchScript) { |
| 392 | + return getLaunchOptions(version, javaVersion, gameDir, javaAgents, javaArguments, makeLaunchScript, null); |
| 393 | + } |
| 394 | + |
| 395 | + |
| 396 | + public LaunchOptions getLaunchOptions(String version, JavaRuntime javaVersion, Path gameDir, List<String> javaAgents, List<String> javaArguments, boolean makeLaunchScript, QuickPlayOption quickPlayOption) { |
400 | 397 | VersionSetting vs = getVersionSetting(version); |
401 | 398 |
|
402 | 399 | LaunchOptions.Builder builder = new LaunchOptions.Builder() |
@@ -444,10 +441,10 @@ public LaunchOptions getLaunchOptions(String version, JavaRuntime javaVersion, P |
444 | 441 | .setJavaArguments(javaArguments); |
445 | 442 |
|
446 | 443 | if (quickPlayOption != null) { |
447 | | - switch (quickPlayOption.type) { |
448 | | - case SINGLEPLAYER -> builder.setWorldFolderName(quickPlayOption.target); |
449 | | - case MULTIPLAYER -> builder.setServerIp(quickPlayOption.target); |
450 | | - case REALM -> builder.setRealmID(quickPlayOption.target); |
| 444 | + switch (quickPlayOption.type()) { |
| 445 | + case SINGLEPLAYER -> builder.setWorldFolderName(quickPlayOption.target()); |
| 446 | + case MULTIPLAYER -> builder.setServerIp(quickPlayOption.target()); |
| 447 | + case REALM -> builder.setRealmID(quickPlayOption.target()); |
451 | 448 | } |
452 | 449 | quickPlayOption = null; |
453 | 450 | } |
|
0 commit comments