LauncherAdapter class abstract interface

An abstract interface class that defines the contract for a launcher adapter. This provides a base for creating custom launcher implementations that can override specific behaviors while maintaining a consistent interface.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

afterBuildClasspath(VersionInfo versionInfo, String versionId, List<String> classpath) Future<void>
Hook called after building classpath
afterBuildJavaArguments(String versionId, String arguments) Future<String>
Hook called after building Java arguments
afterDownloadAssets(String versionId) Future<void>
Hook called after downloading assets
afterDownloadClientJar(String versionId) Future<void>
Hook called after downloading client jar
afterDownloadLibraries(String versionId) Future<void>
Hook called after downloading libraries
afterExtractNativeLibraries(String versionId, String nativesPath) Future<void>
Hook called after extracting native libraries
afterFetchVersionManifest<T extends VersionInfo>(String versionId, T? versionInfo) Future<T?>
Hook called after fetching version manifest
afterGetAssetIndex(String versionId, String assetIndex) Future<void>
Hook called after getting asset index
afterStartProcess(String versionId, MinecraftProcessInfo processInfo, MinecraftAuth? auth) Future<void>
Hook called after starting the Minecraft process
beforeBuildClasspath(VersionInfo versionInfo, String versionId) Future<List<String>>
Hook called ae building classpath
beforeBuildJavaArguments(String versionId, JavaArgumentsBuilder builder, VersionInfo versionInfo) Future<Arguments?>
Hook called before building Java arguments This allows customization of the JavaArgumentsBuilder before arguments are built
beforeDownloadAssets(String versionId) Future<bool>
Hook called before downloading assets Returns true if the download should proceed, false to skip
beforeDownloadClientJar(String versionId) Future<bool>
Hook called before downloading client jar
beforeDownloadLibraries(String versionId) Future<bool>
Hook called before downloading libraries Returns true if the download should proceed, false to skip
beforeExtractNativeLibraries(String versionId) Future<bool>
Hook called before extracting native libraries Returns true if the extraction should proceed, false to skip
beforeFetchVersionManifest(String versionId) Future<void>
Hook called before fetching version manifest
beforeGetAssetIndex<T extends VersionInfo>(String versionId, T versionInfo) Future<bool>
Hook called before getting asset index Returns true if the asset index retrieval should be skipped
beforeStartProcess(String javaExe, List<String> javaArgs, String workingDirectory, Map<String, String> environment, String versionId, MinecraftAuth? auth) Future<void>
Hook called before starting the Minecraft process
downloadAssets<T extends VersionInfo>(T versionInfo) Future<void>
Download assets from https://resources.download.minecraft.net.
downloadClientJar() Future<void>
Download client jar from Mojang servers
downloadLibraries() Future<void>
Download libraries from https://libraries.minecraft.net.
extractNativeLibraries() Future<String>
Extract native libraries
getAccountProfile() → MinecraftAccountProfile?
Get minecraft account profile
getActiveProfile() Profile
Get an active profile
getAdditionalNativeLibraries(String versionId, String nativesPath) Future<List<String>>
Get additional native libraries to extract. These libraries will be added to the native libraries extracted from the version's libraries.
getAssetIndex(String versionId) Future<String>
Get asset index for a given version ID
getCustomAssetIndexPath(String versionId, String assetIndex) String?
Get custom asset index path to override default path Return null to use the default path
getCustomAssetsDirectory() String?
Get custom assets directory path to override default path Return null to use the default directory
getGameDir() String
Get game directory
getJavaArgumentsBuilder() JavaArgumentsBuilder
A builder for Java arguments
getJavaDir() String
Get the Java executable file path
getMicrosoftAccount() → MicrosoftAccount?
Get Microsoft account
getProfiles() LauncherProfiles
Get the launcher profiles
isModded() bool
Get the launcher is modded
launch({JavaStderrCallback? onStderr, JavaStdoutCallback? onStdout, JavaExitCallback? onExit}) Future<void>
Launch the game
loadProfiles() Future<void>
Load launcher profiles from launcher_profiles.json
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setActiveProfile(Profile profile) → void
Set the active profile
setActiveProfileById(String profileId) → void
Set the active profile by ID
setGameDir(String gameDir) → void
Set game directory
setJavaDir(String javaDir) → void
Set the Java executable file path
terminate() → void
Terminate the running Minecraft process
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited