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
minecraft-launcher-lib-2.0.tar.gz
(10.6 kB
view hashes)
Built Distribution
Close
Hashes for minecraft-launcher-lib-2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 528118d9474482d47e68de31dd7a05fe8876c92f0462fe6aefeffe1eaed6b822 |
|
MD5 | 76c1f53089362a686540983aec726a1e |
|
BLAKE2b-256 | 0023465b23909976efa2a0c0e24ea39283311d3d46cadf142aab5a07f4984171 |
Close
Hashes for minecraft_launcher_lib-2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa44e79f1bd74bbcf1ffdb2b4fa2149ef775b1740f1de3bc6df364d5365da345 |
|
MD5 | d487901fef80346bbc10d0ffbdc0d332 |
|
BLAKE2b-256 | fe59ef74e90850198aadebf30541e25f630cf9e6b003cd7bcb44dda4d748fc84 |