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
- Forge supported
- Old versions like alpha or beta supported
- Documention 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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc38c1313e81ad0aecc6cd7739a2180847630e56ff5158ca86b2de016dffe4c0 |
|
MD5 | 18a8f1b82fecfd7f269f888953413311 |
|
BLAKE2b-256 | 362aee408eb38edf3f8d0be8c82c5a86124f84a33760b184052d5d282b54f7c6 |
Close
Hashes for minecraft_launcher_lib-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2febe095502f53c8e50628405e91451e9435d16c4497e60b0810954a4391ffd |
|
MD5 | fbadfa455545774b1091edb617747ea3 |
|
BLAKE2b-256 | 4c11a1de4850bc3a75623ccc25369d7e312b6a44c95e3f8332bdf022c5badc40 |