### Setup ServerWrapper with GravitLauncher Source: https://gravitlauncher.com/servers This command initiates the setup process for ServerWrapper on your server. It requires the ServerWrapper.jar file and prompts for server details like the core JAR name, server name, GravitLauncher address, and the generated server token. ```bash java -jar ServerWrapper.jar setup ``` -------------------------------- ### Install Vanilla Client Source: https://gravitlauncher.com/clientbuild Installs a Vanilla Minecraft client. Requires a client name and the Minecraft version. The client name is a custom identifier for your installation. ```Shell installclient MyVanillaClient 1.20.2 VANILLA ``` -------------------------------- ### Install Fabric Client Source: https://gravitlauncher.com/clientbuild Installs a Fabric modded Minecraft client. Requires a client name, the Minecraft version, and the client type specified as FABRIC. ```Shell installclient MyFabricClient 1.20.2 FABRIC ``` -------------------------------- ### Install Forge Client (No GUI) Source: https://gravitlauncher.com/clientbuild Installs a Forge modded Minecraft client, specifically for versions that support no-GUI installation or when X11 forwarding is not available. Requires manual placement of the installer and specifies the client name, version, and type as FORGE. ```Shell installclient MyForgeClient 1.7.10 FORGE ``` -------------------------------- ### Patch and Build Velocity Proxy Source: https://gravitlauncher.com/servers This guide explains how to patch and build the Velocity proxy server. It involves copying a patch file, applying it with Git, and then using Gradle to assemble the project. ```bash cp Velocity.patch . git am Velocity.patch ./gradlew assemble ``` -------------------------------- ### Configure MySQL Database Connection Source: https://gravitlauncher.com/auth Sets up the connection details for a MySQL database, including driver class, JDBC URL, username, password, and HikariCP settings. It also defines table names for users and hardware IDs, and password verification parameters. ```json { "std": { "isDefault": true, "core": { "holder": { "driverClass": "com.mysql.cj.jdbc.Driver", "jdbcUrl": "jdbc:mysql://localhost:3306/database", "username": "username", "password": "password", "hikariMaxLifetime": 1800000, "initializeAtStart": false }, "expireSeconds": 3600, "uuidColumn": "uuid", "usernameColumn": "username", "accessTokenColumn": "accesstoken", "passwordColumn": "password", "serverIDColumn": "serverid", "hardwareIdColumn": "hwidId", "tableHWID": "hwids", "tableHWIDLog": "hwidLog", "table": "users", "passwordVerifier": { "cost": 10, "type": "bcrypt" }, "type": "sql" }, "textureProvider": { "skinURL": "http://example.com/skins/%username%.png", "cloakURL": "http://example.com/cloaks/%username%.png", "type": "request" }, "displayName": "Default", "visible": true } } ``` -------------------------------- ### GravitLauncher Launcher Signing: Get Key Alias Source: https://gravitlauncher.com/other Demonstrates how to obtain the key alias from a .p12 or .pfx keystore file using the `keytool` utility from the JDK. The alias is required for signing the launcher. ```Shell keytool -storepass PASSWORD -keystore PATH_TO_PFX_OR_P12 -list ``` -------------------------------- ### SQL Insert for User Permissions Source: https://gravitlauncher.com/auth This SQL statement demonstrates how to grant a specific permission ('launchserver.profile.hitech.*') to a user identified by their username. It selects the user's UUID from the 'users' table and inserts it into the 'user_permissions' table. ```SQL INSERT INTO user_permissions (uuid, name) SELECT uuid, 'launchserver.profile.hitech.*' FROM users WHERE name = '<ник>'; ``` -------------------------------- ### Configure Merged Authentication Methods Source: https://gravitlauncher.com/auth Defines a merged authentication method that combines multiple authentication strategies. It specifies the list of authentication methods to merge and sets visibility and default status. ```json { "merged": { "core": { "list": ["std", "microsoft"] "type": "merge" }, "visible": false, "isDefault": false, "displayName": "Merged" } } ``` -------------------------------- ### SQL Table for User Permissions Source: https://gravitlauncher.com/auth This SQL code defines the 'user_permissions' table, which stores user UUIDs and their associated permission names. It includes a unique index to ensure that each permission is assigned only once per user. ```SQL CREATE TABLE user_permissions ( uuid varchar(36) NOT NULL, name varchar(100) NOT NULL ); CREATE UNIQUE INDEX uk_user_permissions_uuid_name ON user_permissions (uuid, name); ``` -------------------------------- ### GravitLauncher AuthCoreProvider Configuration (Memory Auth) Source: https://gravitlauncher.com/auth This JSON configuration snippet sets up the 'memory' authentication type for GravitLauncher's AuthCoreProvider. It includes settings for skin and cloak URLs, designates it as the default authentication method, and provides a display name. ```JSON "std": { "core": { "type": "memory" }, "textureProvider": { "skinURL": "http://example.com/skins/%username%.png", "cloakURL": "http://example.com/cloaks/%username%.png", "type": "request" }, "isDefault": true, "displayName": "Default" } ``` -------------------------------- ### Configure Custom Java Runtimes in GravitLauncher Source: https://gravitlauncher.com/runtime This snippet shows how to configure the `javaList` in `config/JavaRuntime/Config.json` to specify custom Java Runtimes for GravitLauncher. It includes examples for Java 17 and 21 on various operating systems and architectures. ```json { "javaList": { "java17-windows-x86": "Java 17 b12 mustdie X86 javafx false", "java17-windows-x86-64": "Java 17 b12 mustdie X86_64 javafx false", "java17-windows-arm-64": "Java 17 b12 mustdie ARM64 javafx false", "java17-linux-x86": "Java 17 b12 linux X86 javafx false", "java17-linux-x86-64": "Java 17 b12 linux X86_64 javafx false", "java17-linux-arm-64": "Java 17 b12 linux ARM64 javafx false", "java17-macosx-64": "Java 17 b12 macosx X86_64 javafx false", "java17-macosx-arm-64": "Java 17 b12 macosx ARM64 javafx false", "java21-windows-x86": "Java 21 b4 mustdie X86 javafx false", "java21-windows-x86-64": "Java 21 b4 mustdie X86_64 javafx false", "java21-windows-arm-64": "Java 21 b4 mustdie ARM64 javafx false", "java21-linux-x86": "Java 21 b4 linux X86 javafx false", "java21-linux-x86-64": "Java 21 b4 linux X86_64 javafx false", "java21-linux-arm-64": "Java 21 b4 linux ARM64 javafx false", "java21-macosx-64": "Java 21 b4 macosx X86_64 javafx false", "java21-macosx-arm-64": "Java 21 b4 macosx ARM64 javafx false" } } ``` -------------------------------- ### Смена Java по умолчанию (Debian/Ubuntu) Source: https://gravitlauncher.com/scriptinstall Команды для установки Java 21 как версии по умолчанию для исполняемых файлов `java` и `javac` в системах Debian/Ubuntu. ```bash sudo update-alternatives --config java sudo update-alternatives --config javac ``` -------------------------------- ### Установка Temurin JDK 21 и пакетов (Debian/Ubuntu) Source: https://gravitlauncher.com/scriptinstall Устанавливает необходимые пакеты и Temurin JDK 21 для Debian и Ubuntu. Включает добавление репозитория Adoptium и установку OpenJFX для архитектур x86_64 и ARM64. ```bash sudo apt-get update ; sudo apt-get install gnupg2 wget apt-transport-https unzip -y ; sudo mkdir -p /etc/apt/keyrings ; sudo wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo tee /etc/apt/keyrings/adoptium.asc ; echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list ; sudo apt-get update ; sudo apt-get install temurin-21-jdk -y ``` ```bash wget https://download2.gluonhq.com/openjfx/22.0.2/openjfx-22.0.2_linux-x64_bin-jmods.zip ; unzip openjfx-22.0.2_linux-x64_bin-jmods.zip ; sudo cp javafx-jmods-22.0.2/* /usr/lib/jvm/temurin-21-jdk-amd64/jmods ; rm -r javafx-jmods-22.0.2 ; rm -rf openjfx-22.0.2_linux-x64_bin-jmods.zip ``` ```bash wget https://download2.gluonhq.com/openjfx/22.0.2/openjfx-22.0.2_linux-aarch64_bin-jmods.zip ; unzip openjfx-22.0.2_linux-aarch64_bin-jmods.zip ; sudo cp javafx-jmods-22.0.2/* /usr/lib/jvm/temurin-21-jdk-arm64/jmods ; rm -r javafx-jmods-22.0.2 ; rm -rf openjfx-22.0.2_linux-aarch64_bin-jmods.zip ``` -------------------------------- ### Download and Prepare Java Runtimes using wget and unzip Source: https://gravitlauncher.com/runtime This code block demonstrates how to download specific Java runtime zip archives using `wget` and then extract them using `unzip`. It also includes commands to remove the original zip files after extraction, preparing them for use with GravitLauncher. ```bash cd updates wget https://mirror.gravit-support.ru/unofficial/jvm/jre-standart-17.0.12%2B10.zip ; wget https://mirror.gravit-support.ru/unofficial/jvm/jre-standart-21.0.4%2B9.zip ; unzip jre-standart-17.0.12+10.zip ; rm -f jre-standart-17.0.12+10.zip ; unzip jre-standart-21.0.4+9.zip ; rm -f jre-standart-21.0.4+9.zip ``` -------------------------------- ### Установка Adoptium JDK 21 (Windows) Source: https://gravitlauncher.com/scriptinstall Устанавливает Adoptium JDK 21 с помощью `winget` в Windows. Требуется запуск PowerShell от имени администратора. ```powershell winget install EclipseAdoptium.Temurin.21.JDK ``` -------------------------------- ### Смена Java по умолчанию (CentOS) Source: https://gravitlauncher.com/scriptinstall Команды для установки Java 21 как версии по умолчанию для исполняемых файлов `java` и `javac` в системах CentOS. ```bash sudo alternatives --config java sudo alternatives --config javac ``` -------------------------------- ### Создание пользователя launcher Source: https://gravitlauncher.com/scriptinstall Создает нового пользователя с именем 'launcher' и оболочкой bash. Эта команда актуальна для дистрибутивов Linux, таких как Ubuntu, Debian, CentOS и ArchLinux. ```bash sudo useradd -m -s /bin/bash launcher ``` -------------------------------- ### Настройка OpenJFX (Windows) Source: https://gravitlauncher.com/scriptinstall Инструкции по установке OpenJFX SDK и jmods для Java 21 в Windows. Файлы jmod копируются в директорию `jmods` JDK, а содержимое SDK распаковывается в корневую директорию JDK. ```powershell # Откройте сайт OpenJFX и скачайте последнюю версию SDK и jmods для Java 21 # Распакуйте файлы с расширением jmod из архива с jmods в C:\\Program Files\\Eclipse Adoptium\\ВАША_JDK\\jmods # Распакуйте файлы из архива _SDK_ (внутри будет папка с названием версии, распакуйте её содержимое а не саму папку) в C:\\Program Files\\Eclipse Adoptium\\ВАША_JDK\\ ``` -------------------------------- ### Работа с пользователем launcher (Linux) Source: https://gravitlauncher.com/scriptinstall Примеры команд для переключения на пользователя 'launcher' с полным входом в систему или без смены каталога, а также для возврата в сессию root. ```bash # Выполнение команд от имени пользователя launcher и переход в домашнюю папку: su - launcher ``` ```bash # Выполнение команд от имени пользователя launcher без смены каталога: su launcher ``` ```bash # Выход обратно в root: exit ``` -------------------------------- ### Установка Temurin JDK 21 (CentOS) Source: https://gravitlauncher.com/scriptinstall Добавляет репозиторий Adoptium и устанавливает Temurin JDK 21 для CentOS. Включает установку OpenJFX для архитектур x86_64 и ARM64. ```bash cat < /etc/yum.repos.d/adoptium.repo [Adoptium] name=Adoptium baseurl=https://packages.adoptium.net/artifactory/rpm/rhel/\$releasever/\$basearch enabled=1 gpgcheck=1 gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public EOF ``` ```bash dnf install temurin-21-jdk ``` ```bash wget https://download2.gluonhq.com/openjfx/22.0.2/openjfx-22.0.2_linux-x64_bin-jmods.zip ; unzip openjfx-22.0.2_linux-x64_bin-jmods.zip ; sudo cp javafx-jmods-22.0.2/* /usr/lib/jvm/temurin-21-jdk/jmods ; rm -r javafx-jmods-22.0.2 ; rm -rf openjfx-22.0.2_linux-x64_bin-jmods.zip ``` ```bash wget https://download2.gluonhq.com/openjfx/22.0.2/openjfx-22.0.2_linux-aarch64_bin-jmods.zip ; unzip openjfx-22.0.2_linux-aarch64_bin-jmods.zip ; sudo cp javafx-jmods-22.0.2/* /usr/lib/jvm/temurin-21-jdk/jmods ; rm -r javafx-jmods-22.0.2 ; rm -rf openjfx-22.0.2_linux-aarch64_bin-jmods.zip ``` -------------------------------- ### Установка библиотеки freetype (Debian/Ubuntu) Source: https://gravitlauncher.com/scriptinstall Устанавливает библиотеку `libfreetype-dev`, которая может потребоваться для решения ошибки `UnsatisfiedLinkError` при запуске Java на Ubuntu 22.04. ```bash sudo apt-get install libfreetype-dev ``` -------------------------------- ### Patch and Build BungeeCord Proxy Source: https://gravitlauncher.com/servers This process outlines the steps to patch and build the BungeeCord proxy server. It includes copying a patch file to the repository, applying it using Git, and then building the project with Maven. ```bash cp BungeeCord.patch . git am BungeeCord.patch mvn package -Dcheckstyle.skip ``` -------------------------------- ### Connect Dependencies for LaunchServer (Gradle) Source: https://gravitlauncher.com/dev This snippet shows how to include the necessary GravitLauncher libraries for developing modules for LaunchServer using Gradle. It lists core, modern core, WebSocket API, and LaunchServer API dependencies. ```Gradle implementation "pro.gravit.launcher:launcher-core:5.5.0" implementation "pro.gravit.launcher:launcher-modern-core:5.5.0" implementation "pro.gravit.launcher:launcher-ws-api:5.5.0" implementation "pro.gravit.launcher:launchserver-api:5.5.0" ``` -------------------------------- ### Patch and Build CloudNet Source: https://gravitlauncher.com/servers This procedure details how to patch and build CloudNet for GravitLauncher integration. It requires copying a patch file, applying it using Git, and then assembling the project with Gradle. ```bash cp CloudNet.patch . git apply CloudNet.patch ./gradlew assemble ``` -------------------------------- ### Connect Dependencies for LaunchServer (Maven) Source: https://gravitlauncher.com/dev This snippet demonstrates how to add the required GravitLauncher libraries for LaunchServer module development using Maven. It specifies dependencies for core, modern core, WebSocket API, and LaunchServer API. ```Maven pro.gravit.launcher launcher-core 5.5.0 pom import pro.gravit.launcher launcher-modern-core 5.5.0 pom import pro.gravit.launcher launcher-ws-api 5.5.0 pom import pro.gravit.launcher launchserver-api 5.5.0 pom import ``` -------------------------------- ### Connect Dependencies for Launcher Client (Maven) Source: https://gravitlauncher.com/dev This snippet demonstrates how to add GravitLauncher libraries for client-side module development in GravitLauncher using Maven. It lists dependencies for core, modern core, WebSocket API, and client API. ```Maven pro.gravit.launcher launcher-core 5.5.0 pom import pro.gravit.launcher launcher-modern-core 5.5.0 pom import pro.gravit.launcher launcher-ws-api 5.5.0 pom import pro.gravit.launcher launcher-client-api 5.5.0 pom import ``` -------------------------------- ### Patch and Build Waterfall Proxy Source: https://gravitlauncher.com/servers This sequence of commands demonstrates how to patch and build the Waterfall proxy server for GravitLauncher integration. It involves downloading a patch file, placing it in the correct directory, and then compiling the proxy. ```bash cp Waterfall.patch BungeeCord-Patches/ ./waterfall build ``` -------------------------------- ### Connect Dependencies for Launcher Client (Gradle) Source: https://gravitlauncher.com/dev This snippet shows how to include GravitLauncher libraries for developing modules for the client side of GravitLauncher using Gradle. It includes core, modern core, WebSocket API, and client API dependencies. ```Gradle implementation "pro.gravit.launcher:launcher-core:5.5.0" implementation "pro.gravit.launcher:launcher-modern-core:5.5.0" implementation "pro.gravit.launcher:launcher-ws-api:5.5.0" implementation "pro.gravit.launcher:launcher-client-api:5.5.0" ``` -------------------------------- ### Download Assets Source: https://gravitlauncher.com/clientbuild This command downloads game assets from Mojang servers. It takes the Minecraft version as an argument and an optional destination folder. If multiple versions are downloaded to the same folder, only missing assets are fetched. ```Shell downloadasset ``` ```Shell Options: Версия Minecraft [default: null] [assets-folder] Папка назначения [default: "assets"] ``` -------------------------------- ### GravitLauncher Profile JSON Configuration Source: https://gravitlauncher.com/clientbuild This JSON object defines the configuration for a GravitLauncher profile, specifying details such as the profile title, UUID, Minecraft version, server information, update settings, JVM arguments, classpath, and client-side settings. ```json { "title": "Vanilla1.17", "uuid": "fa9c1a52-6fa9-4da6-a488-9fc80250095c", "version": "1.17", "info": "Информация о сервере", "dir": "Vanilla1.17", "sortIndex": 0, "assetIndex": "1.17", "assetDir": "asset1.17", "update": [ "servers.dat" ], "updateExclusions": [], "updateVerify": [ "libraries", "natives", "minecraft.jar", "forge.jar", "liteloader.jar", "mods" ], "updateOptional": [], "jvmArgs": [ "-XX:+DisableAttachMechanism", "-XX:+UseG1GC", "-XX:+UnlockExperimentalVMOptions", "-XX:G1NewSizePercent=20", "-XX:MaxGCPauseMillis=50", "-XX:G1HeapRegionSize=32M", "-Djava.library.path=natives", "-Dfml.ignorePatchDiscrepancies=true", "-Dfml.ignoreInvalidMinecraftCertificates=true" ], "classPath": [ "libraries", "minecraft.jar", "forge.jar", "liteloader.jar" ], "altClassPath": [], "clientArgs": [], "compatClasses": [], "properties": {}, "servers": [ { "name": "Vanilla1.17", "serverAddress": "localhost", "serverPort": 25535, "isDefault": true, "protocol": -1, "socketPing": true } ], "classLoaderConfig": "LAUNCHER", "recommendJavaVersion": 16, "minJavaVersion": 16, "maxJavaVersion": 999, "warnMissJavaVersion": true, "settings": { "ram": 0, "autoEnter": false, "fullScreen": false }, "limited": false, "mainClass": "net.minecraft.client.main.Main" } ``` -------------------------------- ### Generate Server Token with GravitLauncher Source: https://gravitlauncher.com/servers This command generates a unique token for your server within the GravitLauncher system. The token is essential for binding your server to the launcher, ensuring secure communication and proper identification. ```bash token server [auth-id] [public-only] ``` -------------------------------- ### GravitLauncher TextureProvider: Local Request Source: https://gravitlauncher.com/other Configures the TextureProvider to use local file paths for skins and cloaks. This method is faster as it avoids additional requests to the LaunchServer for hash calculation, reading files directly from the specified local paths. ```JSON { "textureProvider": { "skinURL": "http://example.com/skins/%username%.png", "cloakURL": "http://example.com/cloaks/%username%.png", "skinLocalPath": "/var/www/site/skins/%username%.png", "cloakLocalPath": "/var/www/site/cloaks/%username%.png", "type": "request" } } ``` -------------------------------- ### GravitLauncher TextureProvider: JSON Method Source: https://gravitlauncher.com/other Configures the TextureProvider to retrieve skin and cloak URLs by making a request to a specified URL. This method can handle 'slim' (thin) skin models and processes metadata returned in the response. ```JSON { "textureProvider": { "url": "http://example.com/getskin.php?username=%username%", "type": "json" } } ``` -------------------------------- ### Allow Updates for Java Runtimes in GravitLauncher Source: https://gravitlauncher.com/runtime This JSON snippet defines the `allowUpdates` array in the GravitLauncher configuration, specifying which Java runtime versions are permitted for updates. It lists various Java 17 and 21 versions across different platforms. ```json { "allowUpdates": [ "java17-windows-x86", "java17-windows-x86-64", "java17-windows-arm-64", "java17-linux-x86", "java17-linux-x86-64", "java17-linux-arm-64", "java17-macosx-64", "java17-macosx-arm-64", "java21-windows-x86", "java21-windows-x86-64", "java21-windows-arm-64", "java21-linux-x86", "java21-linux-x86-64", "java21-linux-arm-64", "java21-macosx-64", "java21-macosx-arm-64" ] } ``` -------------------------------- ### GravitLauncher ServerWrapper Inline Mode Arguments Source: https://gravitlauncher.com/servers These Java system properties are used to enable inline mode for ServerWrapper, particularly for servers with complex startup procedures like Forge 1.18+. This mode allows ServerWrapper to be integrated directly into the classpath, simplifying the binding process. ```java -Dlauncher.authlib.inlineClass=pro.gravit.launcher.server.ServerWrapperInlineInitializer -Dlauncher.useSlf4j=true ``` -------------------------------- ### GravitLauncher TextureProvider: Remote Request Source: https://gravitlauncher.com/other Configures the TextureProvider to fetch skins and cloaks via remote URLs. It supports placeholders like %username%, %uuid%, and %hash%. This method is used when skins are not stored locally. ```JSON { "textureProvider": { "skinURL": "http://example.com/skins/%username%.png", "cloakURL": "http://example.com/cloaks/%username%.png", "type": "request" } } ``` -------------------------------- ### GravitLauncher TextureProvider: Void Method Source: https://gravitlauncher.com/other Configures the TextureProvider with the 'void' type, meaning no skins or cloaks are provided through this mechanism. This is useful when another system, like a plugin, handles skin management. ```JSON { "textureProvider": { "type": "void" } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.