Compare commits
6 Commits
eacefdacb4
...
f30416de7a
Author | SHA1 | Date |
---|---|---|
microwin7 | f30416de7a | |
Gravita | cdb54b34de | |
XakepSDK | 1ebe68f5b8 | |
Gravita | b719255bd5 | |
Gravita | 6ecf716fca | |
microwin7 | 0e1691ee4c |
|
@ -16,7 +16,7 @@
|
|||
|
||||
-keeppackagenames com.google.gson.**,pro.gravit.repackage.**,org.fusesource.**, pro.gravit.launcher.runtime.api.**, pro.gravit.launcher.base.api.**, pro.gravit.launcher.client.api.**, pro.gravit.utils.**, pro.gravit.launcher.base.request.**, pro.gravit.launcher.base.events.**, pro.gravit.launcher.base.profiles.**
|
||||
|
||||
-keep class com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,com.google.gson.**,pro.gravit.repackage.**,org.fusesource.**, pro.gravit.launcher.client.api.**, pro.gravit.utils.**, pro.gravit.launcher.base.request.**, pro.gravit.launcher.base.events.**, pro.gravit.launcher.base.profiles.**, pro.gravit.launcher.runtime.LauncherEngineWrapper {
|
||||
-keep class com.mojang.**,net.minecraftforge.fml.**,cpw.mods.fml.**,com.google.gson.**,pro.gravit.repackage.**,org.fusesource.**, pro.gravit.launcher.client.api.**, pro.gravit.launcher.base.api.**, pro.gravit.utils.**, pro.gravit.launcher.base.request.**, pro.gravit.launcher.base.events.**, pro.gravit.launcher.base.profiles.**, pro.gravit.launcher.runtime.LauncherEngineWrapper {
|
||||
*;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@ package pro.gravit.launcher.base.request.auth.password;
|
|||
import pro.gravit.launcher.base.request.auth.AuthRequest;
|
||||
|
||||
public class AuthCodePassword implements AuthRequest.AuthPasswordInterface {
|
||||
public final String code;
|
||||
public final String uri;
|
||||
|
||||
public AuthCodePassword(String code) {
|
||||
this.code = code;
|
||||
public AuthCodePassword(String uri) {
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,9 +6,9 @@ public final class Version implements Comparable<Version> {
|
|||
|
||||
public static final int MAJOR = 5;
|
||||
public static final int MINOR = 6;
|
||||
public static final int PATCH = 0;
|
||||
public static final int PATCH = 1;
|
||||
public static final int BUILD = 1;
|
||||
public static final Version.Type RELEASE = Type.STABLE;
|
||||
public static final Version.Type RELEASE = Type.DEV;
|
||||
public final int major;
|
||||
public final int minor;
|
||||
public final int patch;
|
||||
|
|
|
@ -258,6 +258,14 @@ public final class CommonHelper {
|
|||
return new ArgsParseResult(conf, classpath, jvmArgs, mainClass, mainModule, jarFile, args);
|
||||
}
|
||||
|
||||
public static <K, V> V multimapFirstOrNullValue(K key, Map<K, List<V>> params) {
|
||||
List<V> list = params.getOrDefault(key, Collections.emptyList());
|
||||
if (list.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return list.getFirst();
|
||||
}
|
||||
|
||||
public record ArgsParseResult(LaunchOptions.ModuleConf conf, List<String> classpath, List<String> jvmArgs, String mainClass, String mainModule, String jarFile, List<String> args) {
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package pro.gravit.utils.helper;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URLDecoder;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
|
||||
public class QueryHelper {
|
||||
public static Map<String, List<String>> splitUriQuery(URI uri) {
|
||||
var query = uri.getRawQuery();
|
||||
if (query == null) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
Map<String, List<String>> params = new HashMap<>();
|
||||
String[] split = query.split("&");
|
||||
for (String qParams : split) {
|
||||
String[] splitParams = qParams.split("=");
|
||||
List<String> strings = params.computeIfAbsent(URLDecoder.decode(splitParams[0], StandardCharsets.UTF_8),
|
||||
k -> new ArrayList<>(1));
|
||||
strings.add(URLDecoder.decode(splitParams[1], StandardCharsets.UTF_8));
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
public static String encodeFormPair(String key, String value) {
|
||||
return URLEncoder.encode(key, StandardCharsets.UTF_8) + "=" + URLEncoder.encode(value, StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
# Modification of the launcher sashok724's v3 from Gravit [![Build Status](https://travis-ci.com/GravitLauncher/Launcher.svg?branch=master)](https://travis-ci.com/GravitLauncher/Launcher)
|
||||
# Modification of the launcher sashok724's v3 from Gravit
|
||||
[![Build Status](https://travis-ci.com/GravitLauncher/Launcher.svg?branch=master)](https://travis-ci.com/GravitLauncher/Launcher)
|
||||
[![Join our Discord](https://img.shields.io/discord/853340557522370561.svg?logo=discord&label=)](https://discord.gg/b9QG4ygY75)
|
||||
|
||||
* [Discord channel](https://discord.gg/b9QG4ygY75)
|
||||
|
||||
|
@ -9,4 +11,4 @@
|
|||
|
||||
```sh
|
||||
curl -s https://raw.githubusercontent.com/GravitLauncher/Launcher/master/get_it.sh | sh
|
||||
```
|
||||
```
|
||||
|
|
2
modules
2
modules
|
@ -1 +1 @@
|
|||
Subproject commit e93620f10963b951c8874dfef17dce91cf8c8da9
|
||||
Subproject commit dba18b58312a92e465ad17d78ea3504a8b3c1818
|
Loading…
Reference in New Issue