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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4b65ea55b7f402866476872e48041c87a8a1690dc9554ead4886538e2332076 |
|
MD5 | 6b2c9b0498fa2d40c828175c68864a72 |
|
BLAKE2b-256 | e97e711135933da1c23b51b4aaaeea2e1768b7c149b1e16d883f5cbee1068c0c |
Close
Hashes for minecraft_launcher_lib-1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5170c7051143a1dc867d66e719b2b362faf8cd945381744de08c7fab90322f1a |
|
MD5 | 9e19d5c902527b3084033116499f188f |
|
BLAKE2b-256 | 68a205bb5a8d7bdf70337dfa60bbbb963299db88a04b5f4894a09cf5a6c1f34d |