Last active
August 19, 2024 14:55
-
-
Save Lampadina17/849e167c1bf60426dd030e581482d009 to your computer and use it in GitHub Desktop.
Handy script for launching minecraft with morpheus launcher from commandline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get the user's home folder | |
home_folder=$HOME | |
# Define the Updater.jar path | |
updater_path="$home_folder/Updater-Stable.jar" | |
# Check if Updater.jar already exists | |
if [ ! -f "$updater_path" ]; then | |
# Download the Updater.jar only if it doesn't exist | |
wget https://morpheuslauncher.it/downloads/Updater-Stable.jar -P "$home_folder" | |
fi | |
# Run the installer | |
java -jar "$updater_path" | |
# Ask the user to enter version | |
read -p "Enter minecraft version: " version | |
# Ask the user to enter the username | |
read -p "Enter your Username: " username | |
# Ask the user to enter the UUID | |
read -p "Enter your UUID: " uuid | |
# Ask the user to enter the token (default to 0 if not provided) | |
read -p "Enter minecraft token (Enter to use default value 0): " token | |
token="${token:-0}" | |
# Build the Java command with the entered values | |
java_command="java -Djava.library.path='$home_folder/.minecraft/versions/$version/natives' -jar '$home_folder/.morpheus/Launcher.jar' -v $version -u $uuid -n $username -t $token" | |
# Execute the Java command | |
echo "Executing the following Java command:" | |
echo "$java_command" | |
eval "$java_command" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment