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)
Features:
- Easy installing
- Get command to run Minecraft
- Login to Mojang account
- Support Forge and Liteloader
- Old versions like alpha or beta supported
- Documention aviable
- Examples aviable
- OpenSource
Thanks to tomsik68 who documented how a minecraft launcher works
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-1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | af9e7aa503dd225fd30fcc25413dc55102ba4018f4997fa118a2fb1c97b20b23 |
|
MD5 | d99b02d5959d603f63802c40ecc650fc |
|
BLAKE2b-256 | 59be19a6c31a8c9a0b2ded4f94ab9b2c935a565af1653ea2cd547a61079dc264 |
Close
Hashes for minecraft_launcher_lib-1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d92c242d49ccb3585564d12b62d8cfdcb7ee6685a602007c3ca7a592cdfcea8f |
|
MD5 | 4af55ff69d155e9ad27ca048500aa70c |
|
BLAKE2b-256 | 070a197b165f5b3b2c8962a286ae195f1c64a1ddfd940758b98e6c60ad25e5a1 |