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 function 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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b19c16bdbcdc7d35ac08e62a0624b0453227e670f2eb246fcfa69fbf9e084af |
|
MD5 | 43bcc991061433ad9b03576ea6c9d3fe |
|
BLAKE2b-256 | 18695b6d68fd8e17375852f47f8cee14888f88d64c200378c9954017a38bc1a8 |
Close
Hashes for minecraft_launcher_lib-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2f6789dc6bee2cf24a812c6f65a5c6b47a0adbd7ee8d31541881b51a99d2458 |
|
MD5 | 3bc6e515de208b1dbf71c32954488556 |
|
BLAKE2b-256 | ecd6f9bf5e7108c8cde3af1192a04d191296544e9832aba2ee902d5f5ba98d15 |