JavaArgumentsBuilder class
Builder class for constructing Java arguments used to launch Minecraft. This class handles the complex task of assembling all necessary JVM and game arguments, including variable substitution and platform-specific formatting.
- Implemented types
Constructors
- JavaArgumentsBuilder({String? launcherName, String? launcherVersion})
- Creates a new JavaArgumentsBuilder instance.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- quickPlayMultiplayer → String
-
Quick play for multiplayer.
no setter
- quickPlayPath → String
-
Quick play path for singleplayer.
no setter
- quickPlayRealms → String
-
Realms ID for quick play.
no setter
- quickPlaySingleplayer → String
-
Singleplayer world name for quick play.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addAdditionalArguments(
String? additionalArgs) → JavaArgumentsBuilder -
Adds additional JVM arguments.
override
-
addClassPaths(
List< String> classPaths) → JavaArgumentsBuilder -
Adds classpath entries.
override
-
addCustomPlaceholders(
Map< String, String> placeholders) → JavaArgumentsBuilder - Adds custom placeholder values for variable substitution.
-
addGameArguments(
Arguments? arguments) → JavaArgumentsBuilder -
Adds game arguments from the version manifest.
override
-
addRawArguments(
String args) → JavaArgumentsBuilder - Adds raw arguments with placeholders that will be processed during build.
-
addRawArgumentsList(
List< String> args) → JavaArgumentsBuilder - Adds raw arguments with placeholders as a list.
-
build(
) → String -
Builds the complete Java arguments string.
override
-
getAdditionalArgs(
) → String? - Gets the additional arguments.
-
getArguments(
) → Arguments? - Gets the arguments object.
-
getAssetsIndexName(
) → String? - Gets the assets index name.
-
getAuthAccessToken(
) → String? - Gets the authentication access token.
-
getAuthPlayerName(
) → String? - Gets the player username.
-
getAuthUuid(
) → String? - Gets the player UUID.
-
getAuthXuid(
) → String? - Gets the authentication XUID.
-
getClassPaths(
) → List< String> - Gets the classpath entries.
-
getClientId(
) → String? - Gets the client ID.
-
getClientJar(
) → String? - Gets the client JAR path.
-
getCustomAssetIndexPath(
) → String? - Gets the custom asset index path
-
getCustomAssetsDirectory(
) → String? - Gets the custom assets directory
-
getCustomPlaceholders(
) → Map< String, String> - Gets the current custom placeholder values.
-
getGameDir(
) → String? - Gets the game directory.
-
getLauncherName(
) → String - Gets the launcher name.
-
getLauncherVersion(
) → String - Gets the launcher version.
-
getMainClass(
) → String? - Gets the main class.
-
getMinecraftArguments(
) → String? - Gets the legacy Minecraft arguments string.
-
getNativesDir(
) → String? - Gets the natives directory.
-
getRawExtraArguments(
) → List< String> - Gets the raw extra arguments list.
-
getUserType(
) → String? - Gets the user authentication type.
-
getVersion(
) → String? - Gets the Minecraft version.
-
mergeArguments(
Arguments baseArgs, Arguments? additionalArgs, {bool prioritizeAdditional = true}) → Arguments - Merges arguments from multiple sources into a single Arguments object.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAssetsIndexName(
String assetsIndexName) → JavaArgumentsBuilder - Sets the asset index name.
-
setAuthAccessToken(
String? authAccessToken) → JavaArgumentsBuilder - Sets the authentication access token.
-
setAuthPlayerName(
String authPlayerName) → JavaArgumentsBuilder - Sets the player username.
-
setAuthUuid(
String authUuid) → JavaArgumentsBuilder - Sets the player UUID.
-
setAuthXuid(
String authXuid) → JavaArgumentsBuilder - Sets the authentication XUID.
-
setClientId(
String clientId) → JavaArgumentsBuilder - Sets the client ID.
-
setClientJar(
String clientJarPath) → JavaArgumentsBuilder -
Sets the path to the client JAR file and adds it to the classpath.
override
-
setCustomAssetIndexPath(
String path) → JavaArgumentsBuilder - Sets a custom path for the asset index file
-
setCustomAssetsDirectory(
String directory) → JavaArgumentsBuilder - Sets a custom directory for game assets
-
setCustomPlaceholder(
String name, String value) → JavaArgumentsBuilder - Sets a single custom placeholder value.
-
setCustomResolution(
int width, int height) → JavaArgumentsBuilder - Sets a custom resolution for the game window.
-
setDemoUser(
bool isDemo) → JavaArgumentsBuilder - Sets the demo user flag.
-
setGameDir(
String gameDir) → JavaArgumentsBuilder -
Sets the game directory.
override
-
setLauncherName(
String launcherName) → JavaArgumentsBuilder - Sets the launcher name.
-
setLauncherVersion(
String launcherVersion) → JavaArgumentsBuilder - Sets the launcher version.
-
setMainClass(
String mainClass) → JavaArgumentsBuilder -
Sets the main class to execute.
override
-
setMinecraftArguments(
String minecraftArguments) → JavaArgumentsBuilder - Sets the legacy Minecraft arguments string.
-
setNativesDir(
String nativesDir) → JavaArgumentsBuilder -
Sets the directory containing native libraries.
override
-
setQuickPlayMultiplayer(
String serverAddress) → JavaArgumentsBuilder - Sets up quick play for multiplayer.
-
setQuickPlayRealms(
String realmId) → JavaArgumentsBuilder - Sets up quick play for Realms.
-
setQuickPlaySingleplayer(
String levelName) → JavaArgumentsBuilder - Sets up quick play for singleplayer.
-
setQuickPlaySupport(
String path) → JavaArgumentsBuilder - Enables quick play support.
-
setUserType(
String userType) → JavaArgumentsBuilder - Sets the user authentication type.
-
setVersion(
String version) → JavaArgumentsBuilder -
Sets the Minecraft version.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited