Less needless verbosity, and return fallback

Needlessly verbose commit message ik.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2022-11-03 17:04:16 +00:00
parent 8ce78dcc54
commit cae1ba7cd8
2 changed files with 4 additions and 10 deletions

View File

@ -67,8 +67,6 @@ import java.util.logging.Logger;
public final class StandardLauncher extends AbstractLauncher {
private static final Logger LOGGER = Logger.getLogger("LegacyLauncher");
public StandardLauncher(Parameters params) {
super(params);
}
@ -101,8 +99,6 @@ public final class StandardLauncher extends AbstractLauncher {
launchParameters.add(serverPort);
}
LOGGER.info("Launching minecraft using the main class entrypoint");
MethodHandle method = ReflectionUtils.findMainMethod(this.mainClassName);
method.invokeExact((Object[]) launchParameters.toArray(new String[0]));
}

View File

@ -127,15 +127,13 @@ public final class LegacyLauncher extends AbstractLauncher {
this.mcParams.contains("--demo")
);
} catch (Throwable e) {
LOGGER.log(Level.SEVERE, "Running applet wrapper failed with exception", e);
LOGGER.log(Level.SEVERE, "Running applet wrapper failed with exception; falling back to main class", e);
}
}
} else {
LOGGER.info("Launching legacy minecraft using the main class entrypoint");
MethodHandle method = ReflectionUtils.findMainEntrypoint(main);
MethodHandle method = ReflectionUtils.findMainEntrypoint(main);
method.invokeExact((Object[]) mcParams.toArray(new String[0]));
}
}
private static class LegacyLauncherProvider implements LauncherProvider {
@Override