Events/Launch/minified-launch
GameStartEvent
Gets fired when Minecraft is starting
Fields
userUserThe user that was used to launch the game
launchConfigurationLaunchConfigurationThe launch configuration that was used to launch the game
onlinebooleanWhether the connectivity check earlier in the launch succeeded
When it fires
This is the last event posted before Minified actually calls ProcessBuilder.start(). By the time you receive it, everything else has already happened: connectivity was checked, Forge/NeoForge (if applicable) was installed, the required Java runtime was resolved, assets/libraries/the client JAR were downloaded, and the full JVM/game argument list was built. It fires exactly once per Launcher.launchMinecraft(...) call, right after the X11 environment fix-up (see ConfigureX11EnvironmentEvent) and immediately before the process starts.
online reflects the result of the connectivity check from earlier in the same call (see CheckConnectionEvent) - user is whatever you passed into launchMinecraft(...), which is null for a fully offline launch.
Once this event fires, Minified blocks on Process.waitFor() until the game exits - see GameStoppedEvent for what happens next.
Listening
Subscribe on the EventBus the event is posted to, see Events for which bus that is.
eventBus.subscribe(GameStartEvent.class, event -> {
User user = event.user();
LaunchConfiguration launchConfiguration = event.launchConfiguration();
boolean online = event.online();
});eventBus.subscribe(GameStartEvent::class.java) { event ->
val user = event.user()
val launchConfiguration = event.launchConfiguration()
val online = event.online()
}Posted by
API reference: com.dervarex.minified.launch.events.launch.GameStartEvent