vanilla_launcher
vanilla_launcher contains some functions for interacting with the Vanilla Minecraft Launcher
- load_vanilla_launcher_profiles(minecraft_directory: Union[str, PathLike]) List[VanillaLauncherProfile]
Loads the profiles of the Vanilla Launcher from the given Minecraft directory
- Parameters
minecraft_directory (Union[str, PathLike]) – The Minecraft directory
- Returns
A List with the Profiles
- Return type
List[VanillaLauncherProfile]
- vanilla_launcher_profile_to_minecraft_options(vanilla_profile: VanillaLauncherProfile) MinecraftOptions
Converts a VanillaLauncherProfile into a Options dict, that can be used by
install_minecraft_version(). You still need to add the Login Data to the Options before you can use it.- Parameters
vanilla_profile (VanillaLauncherProfile) – The profile as returned by
load_vanilla_launcher_profiles()- Raises
InvalidVanillaLauncherProfile – The given Profile is invalid
- Returns
The Options Dict
- Return type
- get_vanilla_launcher_profile_version(vanilla_profile: VanillaLauncherProfile) str
Returns the Minecraft version of the VanillaProfile. Handles
latest-releaseandlatest-snapshot.- Parameters
vanilla_profile (VanillaLauncherProfile) – The Profile
- Raises
InvalidVanillaLauncherProfile – The given Profile is invalid
- Returns
The Minecraft version
- Return type
str
- add_vanilla_launcher_profile(minecraft_directory: Union[str, PathLike], vanilla_profile: VanillaLauncherProfile) None
Adds a new Profile to the Vanilla Launcher
- Parameters
minecraft_directory (Union[str, PathLike]) – The Minecraft directory
vanilla_profile (VanillaLauncherProfile) – The new Profile
- Raises
InvalidVanillaLauncherProfile – The given Profile is invalid
- Return type
None
- do_vanilla_launcher_profiles_exists(minecraft_directory: Union[str, PathLike]) bool
Checks if profiles from the vanilla launcher can be found
- Parameters
minecraft_directory (Union[str, PathLike]) – The Minecraft directory
- Returns
If profiles exists
- Return type
bool