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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 397107bf3e85e0c43bbd667f3e41a55365623de9c71385a9339c8c87db2d8b09 |
|
MD5 | cc2fb3c2d1ec5bb79fcec25f146c3f0b |
|
BLAKE2b-256 | 998b7ae6966d8452ee482838e9557acbea213d0c05175d73a2dc84cae3af19d3 |
Close
Hashes for minecraft_launcher_lib-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a610bd52064840ee9cbd1c4a33ae6e42c560df189151ee5ca3aaca8ba62c12e |
|
MD5 | b07ac7819e58575e14247e3e1d1dc4d9 |
|
BLAKE2b-256 | 394cdc803e657566e815e7f19d31fa4d558a7520534dc61befc6764e9a7922bf |