pub trait Launch {
// Required method
fn launch<'a>(
&'a mut self,
profile: &'a UserProfile,
java_distribution: JavaDistribution,
) -> LaunchBuilder<'a, Self>
where Self: Sized;
}Required Methods§
Sourcefn launch<'a>(
&'a mut self,
profile: &'a UserProfile,
java_distribution: JavaDistribution,
) -> LaunchBuilder<'a, Self>where
Self: Sized,
fn launch<'a>(
&'a mut self,
profile: &'a UserProfile,
java_distribution: JavaDistribution,
) -> LaunchBuilder<'a, Self>where
Self: Sized,
Launch the game with a builder pattern
§Arguments
profile: User profile from authenticationjava_distribution: Java distribution to use
§Returns
A LaunchBuilder for configuring JVM options and game arguments
§Example
// Simple launch
version.launch(&profile, JavaDistribution::Zulu).await?;
// With custom options
version.launch(&profile, JavaDistribution::Zulu)
.with_jvm_options()
.set("Xmx", "4G")
.done()
.with_arguments()
.set(KEY_WIDTH, "1920")
.done()
.await?;