A library for creating a custom Minecraft launcher
Project description
minecraft-launcher-lib
A Python library for creating a custom minecraft launcher. This library containts functions to install and execute minecraft and interacting with mojang accounts.
import minecraft_launcher_lib
import subprocess
#Get latest version
latest_version = minecraft_launcher_lib.utils.get_latest_version()["release"]
#Get Minecraft directory
minecraft_directory = minecraft_launcher_lib.utils.get_minecraft_directory()
#Make sure, the latest version of Minecraft is installed
minecraft_launcher_lib.install.install_minecraft_version(latest_version,minecraft_directory)
#Login
login_data = minecraft_launcher_lib.account.login_user("JohnDoe","secret")
#Get Minecraft command
options = {
"username": login_data["selectedProfile"]["name"],
"uuid": login_data["selectedProfile"]["id"],
"token": login_data["accessToken"]
}
minecraft_command = minecraft_launcher_lib.command.get_minecraft_command(latest_version,minecraft_directory,options)
#Start Minecraft
subprocess.call(minecraft_command)
Thanks to tomsik68 who documented how a minecraft launcher works
Note:
This library is still beta. It might not work with all versions of minecraft yet, but the latest (1.14) is tested.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for minecraft-launcher-lib-0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e37d4314b6e571041cb39ea12f72d5c1e7a798464116ef183c9d6894fc19e863 |
|
MD5 | 624164e684ebf56b93e9b9668c29aab4 |
|
BLAKE2b-256 | a692a7a07840f6dfcf529fed31cd84ff6a4e055a543cf07909f4bbdd8d9798ff |
Close
Hashes for minecraft_launcher_lib-0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4719e61f273516cddbf4dd3d8b4dc13c5c0b76f9e2e25af9a9b8103a07e7988d |
|
MD5 | 030b1dfa97a147339a15685388f53b12 |
|
BLAKE2b-256 | a747505797148803a380cb56043c8738dfa65466f8594de204b0affac026181e |