mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
IDEA Refractoring
This commit is contained in:
parent
6377f9f287
commit
f9b8bd2947
56 changed files with 180 additions and 242 deletions
|
@ -31,7 +31,6 @@
|
||||||
import java.util.zip.CRC32;
|
import java.util.zip.CRC32;
|
||||||
|
|
||||||
import ru.gravit.launcher.Launcher;
|
import ru.gravit.launcher.Launcher;
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.launcher.hasher.HashedDir;
|
import ru.gravit.launcher.hasher.HashedDir;
|
||||||
import ru.gravit.launcher.serialize.config.entry.*;
|
import ru.gravit.launcher.serialize.config.entry.*;
|
||||||
import ru.gravit.launchserver.manangers.MirrorManager;
|
import ru.gravit.launchserver.manangers.MirrorManager;
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
|
|
||||||
public final class AuthException extends IOException {
|
public final class AuthException extends IOException {
|
||||||
private static final long serialVersionUID = -2586107832847245863L;
|
private static final long serialVersionUID = -2586107832847245863L;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.launcher.NeedGarbageCollection;
|
import ru.gravit.launcher.NeedGarbageCollection;
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ public ClientPermissions() {
|
||||||
canServer = false;
|
canServer = false;
|
||||||
}
|
}
|
||||||
public ClientPermissions(long data) {
|
public ClientPermissions(long data) {
|
||||||
canAdmin = (data & (1 << 0)) != 0;
|
canAdmin = (data & (1)) != 0;
|
||||||
canServer = (data & (1 << 1)) != 0;
|
canServer = (data & (1 << 1)) != 0;
|
||||||
}
|
}
|
||||||
public static ClientPermissions getSuperuserAccount()
|
public static ClientPermissions getSuperuserAccount()
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
import com.zaxxer.hikari.HikariConfig;
|
import com.zaxxer.hikari.HikariConfig;
|
||||||
import com.zaxxer.hikari.HikariDataSource;
|
import com.zaxxer.hikari.HikariDataSource;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
import ru.gravit.launcher.serialize.config.ConfigObject;
|
import ru.gravit.launcher.serialize.config.ConfigObject;
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
import ru.gravit.launcher.serialize.config.ConfigObject;
|
import ru.gravit.launcher.serialize.config.ConfigObject;
|
||||||
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.launcher.NeedGarbageCollection;
|
import ru.gravit.launcher.NeedGarbageCollection;
|
||||||
import ru.gravit.launcher.managers.GarbageManager;
|
import ru.gravit.launcher.managers.GarbageManager;
|
||||||
import ru.gravit.launcher.serialize.config.entry.BooleanConfigEntry;
|
import ru.gravit.launcher.serialize.config.entry.BooleanConfigEntry;
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.helper.CommonHelper;
|
import ru.gravit.utils.helper.CommonHelper;
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
import ru.gravit.utils.helper.IOHelper;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
||||||
import ru.gravit.launchserver.auth.provider.AuthProviderResult;
|
import ru.gravit.launchserver.auth.provider.AuthProviderResult;
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
import ru.gravit.launcher.serialize.config.ConfigObject;
|
import ru.gravit.launcher.serialize.config.ConfigObject;
|
||||||
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package ru.gravit.launchserver.auth.provider;
|
package ru.gravit.launchserver.auth.provider;
|
||||||
|
|
||||||
import ru.gravit.launcher.serialize.config.entry.BooleanConfigEntry;
|
import ru.gravit.launcher.serialize.config.entry.BooleanConfigEntry;
|
||||||
import ru.gravit.launcher.serialize.config.entry.StringConfigEntry;
|
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
import ru.gravit.utils.helper.SecurityHelper;
|
import ru.gravit.utils.helper.SecurityHelper;
|
||||||
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
import ru.gravit.launchserver.auth.handler.AuthHandler;
|
import ru.gravit.launchserver.auth.handler.AuthHandler;
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package ru.gravit.launchserver.auth.provider;
|
package ru.gravit.launchserver.auth.provider;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
import ru.gravit.utils.helper.SecurityHelper;
|
import ru.gravit.utils.helper.SecurityHelper;
|
||||||
import ru.gravit.utils.helper.SecurityHelper.DigestAlgorithm;
|
import ru.gravit.utils.helper.SecurityHelper.DigestAlgorithm;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
import ru.gravit.launcher.Launcher;
|
import ru.gravit.launcher.Launcher;
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
import ru.gravit.utils.helper.IOHelper;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
|
|
|
@ -3,10 +3,8 @@
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.launcher.serialize.signed.DigestBytesHolder;
|
import ru.gravit.launcher.serialize.signed.DigestBytesHolder;
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
import ru.gravit.utils.helper.IOHelper;
|
||||||
import ru.gravit.launcher.serialize.signed.SignedBytesHolder;
|
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
import ru.gravit.utils.helper.SecurityHelper;
|
import ru.gravit.utils.helper.SecurityHelper;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package ru.gravit.launchserver.command;
|
package ru.gravit.launchserver.command;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
|
|
||||||
public final class CommandException extends Exception {
|
public final class CommandException extends Exception {
|
||||||
private static final long serialVersionUID = -6588814993972117772L;
|
private static final long serialVersionUID = -6588814993972117772L;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
import ru.gravit.launchserver.command.Command;
|
import ru.gravit.launchserver.command.Command;
|
||||||
import ru.gravit.launchserver.socket.NettyServerSocketHandler;
|
import ru.gravit.launchserver.socket.NettyServerSocketHandler;
|
||||||
import ru.gravit.launchserver.socket.websocket.WebSocketService;
|
|
||||||
import ru.gravit.utils.helper.CommonHelper;
|
import ru.gravit.utils.helper.CommonHelper;
|
||||||
|
|
||||||
public class TestCommand extends Command {
|
public class TestCommand extends Command {
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.launchserver.command.basic.*;
|
import ru.gravit.launchserver.command.basic.*;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package ru.gravit.launchserver.command.hash;
|
package ru.gravit.launchserver.command.hash;
|
||||||
|
|
||||||
import java.net.URL;
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
import com.eclipsesource.json.JsonObject;
|
import com.eclipsesource.json.JsonObject;
|
||||||
import com.eclipsesource.json.WriterConfig;
|
import com.eclipsesource.json.WriterConfig;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
import ru.gravit.utils.helper.IOHelper;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
import ru.gravit.utils.helper.SecurityHelper;
|
import ru.gravit.utils.helper.SecurityHelper;
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
import io.netty.handler.ssl.SslHandler;
|
import io.netty.handler.ssl.SslHandler;
|
||||||
import io.netty.handler.stream.ChunkedFile;
|
import io.netty.handler.stream.ChunkedFile;
|
||||||
import io.netty.util.CharsetUtil;
|
import io.netty.util.CharsetUtil;
|
||||||
import io.netty.util.internal.SystemPropertyUtil;
|
|
||||||
|
|
||||||
import javax.activation.MimetypesFileTypeMap;
|
import javax.activation.MimetypesFileTypeMap;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.launcher.NeedGarbageCollection;
|
import ru.gravit.launcher.NeedGarbageCollection;
|
||||||
import ru.gravit.launchserver.socket.Client;
|
import ru.gravit.launchserver.socket.Client;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import ru.gravit.launchserver.socket.Client;
|
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
import ru.gravit.launcher.serialize.HInput;
|
import ru.gravit.launcher.serialize.HInput;
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
import ru.gravit.launcher.serialize.SerializeLimits;
|
import ru.gravit.launcher.serialize.SerializeLimits;
|
||||||
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
|
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
import ru.gravit.launchserver.auth.AuthException;
|
|
||||||
import ru.gravit.launchserver.response.Response;
|
import ru.gravit.launchserver.response.Response;
|
||||||
import ru.gravit.launchserver.socket.Client;
|
import ru.gravit.launchserver.socket.Client;
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,14 @@
|
||||||
package ru.gravit.launchserver.response.update;
|
package ru.gravit.launchserver.response.update;
|
||||||
|
|
||||||
import ru.gravit.launcher.profiles.ClientProfile;
|
|
||||||
import ru.gravit.launcher.serialize.HInput;
|
import ru.gravit.launcher.serialize.HInput;
|
||||||
import ru.gravit.launcher.serialize.HOutput;
|
import ru.gravit.launcher.serialize.HOutput;
|
||||||
import ru.gravit.launcher.serialize.signed.DigestBytesHolder;
|
import ru.gravit.launcher.serialize.signed.DigestBytesHolder;
|
||||||
import ru.gravit.launcher.serialize.signed.SignedBytesHolder;
|
|
||||||
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
|
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
import ru.gravit.launchserver.manangers.SessionManager;
|
|
||||||
import ru.gravit.launchserver.response.Response;
|
import ru.gravit.launchserver.response.Response;
|
||||||
import ru.gravit.launchserver.socket.Client;
|
import ru.gravit.launchserver.socket.Client;
|
||||||
import ru.gravit.utils.helper.SecurityHelper;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.SignatureException;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
public final class LauncherResponse extends Response {
|
public final class LauncherResponse extends Response {
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,11 @@
|
||||||
package ru.gravit.launchserver.response.update;
|
package ru.gravit.launchserver.response.update;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import ru.gravit.launcher.serialize.signed.DigestBytesHolder;
|
|
||||||
import ru.gravit.launchserver.binary.LauncherBinary;
|
import ru.gravit.launchserver.binary.LauncherBinary;
|
||||||
import ru.gravit.utils.helper.SecurityHelper;
|
import ru.gravit.utils.helper.SecurityHelper;
|
||||||
import ru.gravit.launcher.profiles.ClientProfile;
|
|
||||||
import ru.gravit.launcher.serialize.HInput;
|
import ru.gravit.launcher.serialize.HInput;
|
||||||
import ru.gravit.launcher.serialize.HOutput;
|
import ru.gravit.launcher.serialize.HOutput;
|
||||||
import ru.gravit.launcher.serialize.signed.SignedBytesHolder;
|
|
||||||
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
|
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
import ru.gravit.launchserver.response.Response;
|
import ru.gravit.launchserver.response.Response;
|
||||||
|
|
||||||
|
|
|
@ -12,17 +12,14 @@
|
||||||
import io.netty.handler.codec.http.HttpServerCodec;
|
import io.netty.handler.codec.http.HttpServerCodec;
|
||||||
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
|
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
|
||||||
import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler;
|
import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler;
|
||||||
import io.netty.handler.codec.json.JsonObjectDecoder;
|
|
||||||
import io.netty.handler.logging.LogLevel;
|
import io.netty.handler.logging.LogLevel;
|
||||||
import io.netty.handler.logging.LoggingHandler;
|
import io.netty.handler.logging.LoggingHandler;
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.launcher.ssl.LauncherKeyStore;
|
import ru.gravit.launcher.ssl.LauncherKeyStore;
|
||||||
import ru.gravit.launcher.ssl.LauncherTrustManager;
|
import ru.gravit.launcher.ssl.LauncherTrustManager;
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
import ru.gravit.launchserver.fileserver.FileServerHandler;
|
import ru.gravit.launchserver.fileserver.FileServerHandler;
|
||||||
import ru.gravit.launchserver.response.Response;
|
import ru.gravit.launchserver.response.Response;
|
||||||
import ru.gravit.launchserver.socket.websocket.WebSocketFrameHandler;
|
import ru.gravit.launchserver.socket.websocket.WebSocketFrameHandler;
|
||||||
import ru.gravit.launchserver.socket.websocket.WebSocketIndexPageHandler;
|
|
||||||
import ru.gravit.utils.helper.CommonHelper;
|
import ru.gravit.utils.helper.CommonHelper;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.helper.CommonHelper;
|
import ru.gravit.utils.helper.CommonHelper;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
import ru.gravit.launcher.managers.GarbageManager;
|
import ru.gravit.launcher.managers.GarbageManager;
|
||||||
|
|
|
@ -13,6 +13,7 @@ public JsonResponseAdapter(WebSocketService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public JsonResponseInterface deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
public JsonResponseInterface deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||||
String typename = json.getAsJsonObject().getAsJsonPrimitive(PROP_NAME).getAsString();
|
String typename = json.getAsJsonObject().getAsJsonPrimitive(PROP_NAME).getAsString();
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package ru.gravit.launchserver.socket.websocket.json;
|
package ru.gravit.launchserver.socket.websocket.json;
|
||||||
|
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.handler.codec.http.websocketx.WebSocketFrame;
|
|
||||||
import ru.gravit.launchserver.socket.Client;
|
import ru.gravit.launchserver.socket.Client;
|
||||||
import ru.gravit.launchserver.socket.websocket.WebSocketService;
|
import ru.gravit.launchserver.socket.websocket.WebSocketService;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import ru.gravit.launchserver.LaunchServer;
|
import ru.gravit.launchserver.LaunchServer;
|
||||||
import ru.gravit.launchserver.command.handler.CommandHandler;
|
|
||||||
import ru.gravit.launchserver.socket.Client;
|
import ru.gravit.launchserver.socket.Client;
|
||||||
import ru.gravit.launchserver.socket.websocket.WebSocketService;
|
import ru.gravit.launchserver.socket.websocket.WebSocketService;
|
||||||
import ru.gravit.launchserver.socket.websocket.json.JsonResponseInterface;
|
import ru.gravit.launchserver.socket.websocket.json.JsonResponseInterface;
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
import ru.gravit.launchserver.socket.websocket.json.JsonResponseInterface;
|
import ru.gravit.launchserver.socket.websocket.json.JsonResponseInterface;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public class JoinServerResponse implements JsonResponseInterface {
|
public class JoinServerResponse implements JsonResponseInterface {
|
||||||
public String serverID;
|
public String serverID;
|
||||||
public String accessToken;
|
public String accessToken;
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
import ru.gravit.launcher.profiles.Texture;
|
import ru.gravit.launcher.profiles.Texture;
|
||||||
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry;
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
import ru.gravit.launcher.profiles.Texture;
|
import ru.gravit.launcher.profiles.Texture;
|
||||||
import ru.gravit.launcher.serialize.config.ConfigObject;
|
import ru.gravit.launcher.serialize.config.ConfigObject;
|
||||||
|
|
|
@ -12,28 +12,31 @@
|
||||||
|
|
||||||
<!-- DrLeonardo Design -->
|
<!-- DrLeonardo Design -->
|
||||||
|
|
||||||
<Pane fx:id="layout" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" visible="true" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane fx:id="layout" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity"
|
||||||
<children>
|
prefHeight="400.0" prefWidth="600.0"
|
||||||
<ImageView id="background" fitHeight="400.0" fitWidth="600.0">
|
xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<image>
|
|
||||||
<Image preserveRatio="true" smooth="true" url="@images/background.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<Pane id="authPane" layoutX="1.0" layoutY="2.0" prefHeight="400.0" prefWidth="600.0">
|
|
||||||
<children>
|
|
||||||
<TextField id="login" alignment="CENTER" layoutX="175.0" layoutY="144.0" prefHeight="45.0" prefWidth="233.0" promptText="Логин" />
|
|
||||||
<PasswordField id="password" alignment="CENTER" layoutX="175.0" layoutY="197.0" prefHeight="45.0" prefWidth="233.0" promptText="Пароль" />
|
|
||||||
<Button id="goAuth" layoutX="159.0" layoutY="319.0" mnemonicParsing="false" opacity="1.0" prefHeight="45.0" prefWidth="267.0" styleClass="btn" text="ВОЙТИ" visible="true" />
|
|
||||||
<CheckBox id="rememberchb" fx:id="savePassword" contentDisplay="CENTER" layoutX="224.0" layoutY="291.0" prefHeight="17.0" prefWidth="137.0" text="Сохранить пароль" textFill="#dadada" />
|
|
||||||
<Hyperlink id="link" fx:id="link" layoutY="371.0" prefHeight="30.0" prefWidth="158.0" textAlignment="CENTER" />
|
|
||||||
<Button id="discord_url" layoutX="278.0" layoutY="373.0" minHeight="16.0" minWidth="28.0" mnemonicParsing="false" prefHeight="16.0" prefWidth="28.0" text="" />
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
<Pane id="mask" opacity="0.0" prefHeight="400.0" prefWidth="600.0" visible="false" />
|
|
||||||
<Button id="hidebtn" focusTraversable="false" layoutX="535.0" layoutY="2.0" minHeight="25.0" minWidth="35.0" prefHeight="25.0" prefWidth="25.0" />
|
|
||||||
<Button id="exitbtn" focusTraversable="false" layoutX="574.0" layoutY="2.0" minHeight="25.0" minWidth="20.0" prefHeight="25.0" prefWidth="20.0" />
|
|
||||||
</children>
|
|
||||||
<stylesheets>
|
<stylesheets>
|
||||||
<URL value="@login.css" />
|
<URL value="@login.css"/>
|
||||||
</stylesheets>
|
</stylesheets>
|
||||||
|
<ImageView id="background" fitHeight="400.0" fitWidth="600.0">
|
||||||
|
<Image preserveRatio="true" smooth="true" url="@images/background.png"/>
|
||||||
|
</ImageView>
|
||||||
|
<Pane id="authPane" layoutX="1.0" layoutY="2.0" prefHeight="400.0" prefWidth="600.0">
|
||||||
|
<TextField id="login" alignment="CENTER" layoutX="175.0" layoutY="144.0" prefHeight="45.0" prefWidth="233.0"
|
||||||
|
promptText="Логин"/>
|
||||||
|
<PasswordField id="password" alignment="CENTER" layoutX="175.0" layoutY="197.0" prefHeight="45.0"
|
||||||
|
prefWidth="233.0" promptText="Пароль"/>
|
||||||
|
<Button id="goAuth" layoutX="159.0" layoutY="319.0" mnemonicParsing="false" prefHeight="45.0" prefWidth="267.0"
|
||||||
|
styleClass="btn" text="ВОЙТИ"/>
|
||||||
|
<CheckBox id="rememberchb" fx:id="savePassword" contentDisplay="CENTER" layoutX="224.0" layoutY="291.0"
|
||||||
|
prefHeight="17.0" prefWidth="137.0" text="Сохранить пароль" textFill="#dadada"/>
|
||||||
|
<Hyperlink id="link" fx:id="link" layoutY="371.0" prefHeight="30.0" prefWidth="158.0" textAlignment="CENTER"/>
|
||||||
|
<Button id="discord_url" layoutX="278.0" layoutY="373.0" minHeight="16.0" minWidth="28.0" mnemonicParsing="false"
|
||||||
|
prefHeight="16.0" prefWidth="28.0"/>
|
||||||
|
</Pane>
|
||||||
|
<Pane id="mask" opacity="0.0" prefHeight="400.0" prefWidth="600.0" visible="false"/>
|
||||||
|
<Button id="hidebtn" focusTraversable="false" layoutX="535.0" layoutY="2.0" minHeight="25.0" minWidth="35.0"
|
||||||
|
prefHeight="25.0" prefWidth="25.0"/>
|
||||||
|
<Button id="exitbtn" focusTraversable="false" layoutX="574.0" layoutY="2.0" minHeight="25.0" minWidth="20.0"
|
||||||
|
prefHeight="25.0" prefWidth="20.0"/>
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|
|
@ -13,74 +13,79 @@
|
||||||
|
|
||||||
<!-- DrLeonardo Design -->
|
<!-- DrLeonardo Design -->
|
||||||
|
|
||||||
<Pane fx:id="layout" maxHeight="-1.0" maxWidth="-1.0" prefHeight="400.0" prefWidth="600.0" visible="true" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane fx:id="layout" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1"
|
||||||
<children>
|
xmlns:fx="http://javafx.com/fxml/1">
|
||||||
|
<stylesheets>
|
||||||
|
<URL value="@mainmenu.css"/>
|
||||||
|
</stylesheets>
|
||||||
<ImageView id="sl_background" fitHeight="400.0" fitWidth="600.0">
|
<ImageView id="sl_background" fitHeight="400.0" fitWidth="600.0">
|
||||||
<image>
|
<Image preserveRatio="true" smooth="true" url="@images/mainmenu/background.png"/>
|
||||||
<Image preserveRatio="true" smooth="true" url="@images/mainmenu/background.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
</ImageView>
|
||||||
<Pane id="serverPane" prefHeight="400.0" prefWidth="600.0">
|
<Pane id="serverPane" prefHeight="400.0" prefWidth="600.0">
|
||||||
<children>
|
<Button id="hidebtn" focusTraversable="false" layoutX="545.0" layoutY="2.0" minHeight="25.0" minWidth="20.0"
|
||||||
<Button id="hidebtn" focusTraversable="false" layoutX="545.0" layoutY="2.0" minHeight="25.0" minWidth="20.0" prefHeight="25.0" prefWidth="25.0" textAlignment="CENTER" />
|
prefHeight="25.0" prefWidth="25.0" textAlignment="CENTER"/>
|
||||||
<Button id="exitbtn" alignment="CENTER" contentDisplay="CENTER" focusTraversable="false" layoutX="572.0" layoutY="2.0" minHeight="25.0" minWidth="20.0" prefHeight="25.0" prefWidth="25.0" rotate="360.0" textAlignment="CENTER" translateX="0.0" />
|
<Button id="exitbtn" alignment="CENTER" contentDisplay="CENTER" focusTraversable="false" layoutX="572.0"
|
||||||
<ScrollPane id="serverlist" hbarPolicy="NEVER" layoutX="0.0" layoutY="27.0" prefHeight="306.0" prefWidth="171.0" visible="true">
|
layoutY="2.0" minHeight="25.0" minWidth="20.0" prefHeight="25.0" prefWidth="25.0" rotate="360.0"
|
||||||
<content>
|
textAlignment="CENTER"/>
|
||||||
<FlowPane id="servercontainer" alignment="TOP_LEFT" columnHalignment="LEFT" focusTraversable="false" hgap="0.0" maxHeight="0.0" maxWidth="0.0" orientation="HORIZONTAL" prefHeight="-1.0" prefWidth="161.0" prefWrapLength="0.0" rowValignment="TOP" vgap="7.0" visible="true">
|
<ScrollPane id="serverlist" hbarPolicy="NEVER" layoutY="27.0" prefHeight="306.0" prefWidth="171.0">
|
||||||
<padding>
|
<FlowPane id="servercontainer" maxHeight="0.0" maxWidth="0.0" prefWidth="161.0" prefWrapLength="0.0"
|
||||||
<Insets top="10.0" />
|
rowValignment="TOP" vgap="7.0">
|
||||||
</padding>
|
<padding>
|
||||||
</FlowPane>
|
<Insets top="10.0"/>
|
||||||
</content>
|
</padding>
|
||||||
|
</FlowPane>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
<ScrollPane id="serverinfo" hbarPolicy="NEVER" layoutX="170.0" layoutY="71.0" pannable="true" prefHeight="234.0" prefWidth="432.0" visible="true">
|
<ScrollPane id="serverinfo" hbarPolicy="NEVER" layoutX="170.0" layoutY="71.0" pannable="true"
|
||||||
<content>
|
prefHeight="234.0" prefWidth="432.0">
|
||||||
<FlowPane id="" focusTraversable="false" orientation="HORIZONTAL" prefHeight="234.0" prefWidth="428.0" rowValignment="TOP" visible="true">
|
<FlowPane id="" prefHeight="234.0" prefWidth="428.0" rowValignment="TOP">
|
||||||
<padding>
|
<padding>
|
||||||
<Insets bottom="10.0" left="15.0" top="7.0" />
|
<Insets bottom="10.0" left="15.0" top="7.0"/>
|
||||||
</padding>
|
</padding>
|
||||||
<children>
|
<Label id="serverDescription" alignment="TOP_LEFT" nodeOrientation="LEFT_TO_RIGHT" prefHeight="213.0"
|
||||||
<Label id="serverDescription" alignment="TOP_LEFT" contentDisplay="LEFT" nodeOrientation="LEFT_TO_RIGHT" prefHeight="213.0" prefWidth="407.0" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis magna tellus, in bibendum tortor dignissim non. Phasellus vel tincidunt nulla, eu convallis ligula. Suspendisse ut diam vestibulum, tincidunt neque ut, posuere risus. Pellentesque posuere molestie eros, quis laoreet ante ornare quis. Morbi eu tortor fermentum, iaculis risus sit amet, fringilla augue. Aenean nulla purus, rutrum non sapien et, convallis tincidunt purus. Vivamus a eros pulvinar, dignissim leo lacinia, sodales nulla. Aliquam tortor augue, cursus a rutrum viverra, consequat non tellus. Donec porta nisl sed quam dictum commodo. Sed et vulputate dolor. Morbi ultrices justo vitae convallis semper. Donec sodales velit vel velit faucibus, et scelerisque felis finibus. Sed rutrum lacinia mauris, porta cursus mauris tempor eu. Duis turpis nulla, dictum vitae commodo rhoncus, pretium in turpis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos." textFill="#d3d3d3" wrapText="true">
|
prefWidth="407.0"
|
||||||
<font>
|
text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis magna tellus, in bibendum tortor dignissim non. Phasellus vel tincidunt nulla, eu convallis ligula. Suspendisse ut diam vestibulum, tincidunt neque ut, posuere risus. Pellentesque posuere molestie eros, quis laoreet ante ornare quis. Morbi eu tortor fermentum, iaculis risus sit amet, fringilla augue. Aenean nulla purus, rutrum non sapien et, convallis tincidunt purus. Vivamus a eros pulvinar, dignissim leo lacinia, sodales nulla. Aliquam tortor augue, cursus a rutrum viverra, consequat non tellus. Donec porta nisl sed quam dictum commodo. Sed et vulputate dolor. Morbi ultrices justo vitae convallis semper. Donec sodales velit vel velit faucibus, et scelerisque felis finibus. Sed rutrum lacinia mauris, porta cursus mauris tempor eu. Duis turpis nulla, dictum vitae commodo rhoncus, pretium in turpis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos."
|
||||||
<Font size="14.0" fx:id="x3" />
|
textFill="#d3d3d3" wrapText="true">
|
||||||
</font>
|
<font>
|
||||||
</Label>
|
<Font size="14.0" fx:id="x3"/>
|
||||||
</children>
|
</font>
|
||||||
</FlowPane>
|
</Label>
|
||||||
</content>
|
</FlowPane>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
<Pane id="serverentrance" layoutX="170.0" layoutY="27.0" prefHeight="372.0" prefWidth="430.0">
|
<Pane id="serverentrance" layoutX="170.0" layoutY="27.0" prefHeight="372.0" prefWidth="430.0">
|
||||||
<children>
|
|
||||||
<Button id="serverLaunch" layoutX="180.0" layoutY="294.0" mnemonicParsing="false" prefHeight="60.0" prefWidth="182.0" text="ИГРАТЬ">
|
<Button id="serverLaunch" layoutX="180.0" layoutY="294.0" mnemonicParsing="false" prefHeight="60.0"
|
||||||
|
prefWidth="182.0" text="ИГРАТЬ">
|
||||||
<font>
|
<font>
|
||||||
<Font size="22.0" />
|
<Font size="22.0"/>
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button id="clientbtn" layoutX="363.0" layoutY="294.0" mnemonicParsing="false" prefHeight="60.0" prefWidth="50.0" text="" />
|
<Button id="clientbtn" layoutX="363.0" layoutY="294.0" mnemonicParsing="false" prefHeight="60.0"
|
||||||
<Label id="serverStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="14.0" layoutY="312.0" opacity="0.61" prefHeight="25.0" prefWidth="153.0" text="12/100" textAlignment="RIGHT" textFill="WHITE">
|
prefWidth="50.0"/>
|
||||||
|
<Label id="serverStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="14.0" layoutY="312.0"
|
||||||
|
opacity="0.61" prefHeight="25.0" prefWidth="153.0" text="12/100" textAlignment="RIGHT"
|
||||||
|
textFill="WHITE">
|
||||||
<font>
|
<font>
|
||||||
<Font name="System Bold" size="16.0" />
|
<Font name="System Bold" size="16.0"/>
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Label id="serverLabel" layoutX="2.0" layoutY="11.0" prefHeight="40.0" prefWidth="274.0" text="СЕРВЕР IFARM">
|
<Label id="serverLabel" layoutX="2.0" layoutY="11.0" prefHeight="40.0" prefWidth="274.0"
|
||||||
<font>
|
text="СЕРВЕР IFARM">
|
||||||
<Font name="System Bold" size="18.0" />
|
<font>
|
||||||
</font>
|
<Font name="System Bold" size="18.0"/>
|
||||||
<padding>
|
</font>
|
||||||
<Insets left="14.0" />
|
<padding>
|
||||||
</padding>
|
<Insets left="14.0"/>
|
||||||
|
</padding>
|
||||||
</Label>
|
</Label>
|
||||||
<Button id="discord_url" alignment="BOTTOM_CENTER" contentDisplay="CENTER" layoutX="386.0" layoutY="23.0" minHeight="16.0" minWidth="28.0" mnemonicParsing="false" prefHeight="16.0" prefWidth="28.0" text="" textAlignment="CENTER" />
|
<Button id="discord_url" alignment="BOTTOM_CENTER" contentDisplay="CENTER" layoutX="386.0" layoutY="23.0"
|
||||||
</children>
|
minHeight="16.0" minWidth="28.0" mnemonicParsing="false" prefHeight="16.0" prefWidth="28.0"
|
||||||
|
textAlignment="CENTER"/>
|
||||||
</Pane>
|
</Pane>
|
||||||
<Button id="logoutbtn" layoutX="19.0" layoutY="350.0" mnemonicParsing="false" prefHeight="31.0" prefWidth="133.0" styleClass="logoutbtn" text="Выйти" />
|
<Button id="logoutbtn" layoutX="19.0" layoutY="350.0" mnemonicParsing="false" prefHeight="31.0"
|
||||||
<Button id="settingsbtn" alignment="CENTER" contentDisplay="CENTER" layoutX="518.0" layoutY="2.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="25.0" text="" textAlignment="CENTER" />
|
prefWidth="133.0" styleClass="logoutbtn" text="Выйти"/>
|
||||||
</children>
|
<Button id="settingsbtn" alignment="CENTER" contentDisplay="CENTER" layoutX="518.0" layoutY="2.0"
|
||||||
|
mnemonicParsing="false" prefHeight="25.0" prefWidth="25.0"
|
||||||
|
textAlignment="CENTER"/>
|
||||||
</Pane>
|
</Pane>
|
||||||
<Pane id="mask" opacity="0.0" prefHeight="400.0" prefWidth="600.0" visible="false" />
|
<Pane id="mask" opacity="0.0" prefHeight="400.0" prefWidth="600.0" visible="false"/>
|
||||||
</children>
|
|
||||||
<stylesheets>
|
|
||||||
<URL value="@mainmenu.css" />
|
|
||||||
</stylesheets>
|
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|
|
@ -9,19 +9,15 @@
|
||||||
|
|
||||||
<!-- DrLeonardo Design -->
|
<!-- DrLeonardo Design -->
|
||||||
|
|
||||||
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1"
|
||||||
<children>
|
xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<Pane id="holder" layoutX="171.0" layoutY="28.0" prefHeight="372.0" prefWidth="429.0">
|
<stylesheets>
|
||||||
<children>
|
<URL value="@options.css"/>
|
||||||
<Button fx:id="apply" defaultButton="true" layoutX="315.0" layoutY="333.0" prefHeight="25.0" prefWidth="100.0" text="Применить" />
|
</stylesheets>
|
||||||
<FlowPane id="holderpane" orientation="HORIZONTAL">
|
<Pane id="holder" layoutX="171.0" layoutY="28.0" prefHeight="372.0" prefWidth="429.0">
|
||||||
<children>
|
<Button fx:id="apply" defaultButton="true" layoutX="315.0" layoutY="333.0" prefHeight="25.0"
|
||||||
</children>
|
prefWidth="100.0" text="Применить"/>
|
||||||
</FlowPane>
|
<FlowPane id="holderpane">
|
||||||
</children>
|
</FlowPane>
|
||||||
</Pane>
|
</Pane>
|
||||||
</children>
|
|
||||||
<stylesheets>
|
|
||||||
<URL value="@options.css" />
|
|
||||||
</stylesheets>
|
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|
|
@ -8,23 +8,20 @@
|
||||||
|
|
||||||
<!-- DrLeonardo Design -->
|
<!-- DrLeonardo Design -->
|
||||||
|
|
||||||
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1"
|
||||||
<children>
|
xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<ImageView fitHeight="161.0" fitWidth="161.0" layoutX="220.0" layoutY="94.0" y="-6.0">
|
<stylesheets>
|
||||||
<image>
|
<URL value="@processing.css"/>
|
||||||
<Image url="@../../images/icons/loading.gif" />
|
</stylesheets>
|
||||||
</image>
|
<ImageView fitHeight="161.0" fitWidth="161.0" layoutX="220.0" layoutY="94.0" y="-6.0">
|
||||||
</ImageView>
|
<Image url="@../../images/icons/loading.gif"/>
|
||||||
<!-- Icon image -->
|
</ImageView>
|
||||||
<ImageView id="spinner" fx:id="spinner" blendMode="COLOR_BURN" fitHeight="79.0" fitWidth="79.0" layoutX="261.0" layoutY="116.0" preserveRatio="true">
|
<!-- Icon image -->
|
||||||
<image>
|
<ImageView id="spinner" fx:id="spinner" blendMode="COLOR_BURN" fitHeight="79.0" fitWidth="79.0" layoutX="261.0"
|
||||||
<Image url="@error.png" />
|
layoutY="116.0" preserveRatio="true">
|
||||||
</image>
|
<Image url="@error.png"/>
|
||||||
</ImageView>
|
</ImageView>
|
||||||
<!-- Description -->
|
<!-- Description -->
|
||||||
<Label fx:id="description" alignment="CENTER" contentDisplay="CENTER" layoutX="159.0" layoutY="249.0" prefHeight="64.0" prefWidth="283.0" text="..." textAlignment="CENTER" />
|
<Label fx:id="description" alignment="CENTER" contentDisplay="CENTER" layoutX="159.0" layoutY="249.0"
|
||||||
</children>
|
prefHeight="64.0" prefWidth="283.0" text="..." textAlignment="CENTER"/>
|
||||||
<stylesheets>
|
|
||||||
<URL value="@processing.css" />
|
|
||||||
</stylesheets>
|
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|
|
@ -14,36 +14,46 @@
|
||||||
|
|
||||||
<!-- DrLeonardo Design -->
|
<!-- DrLeonardo Design -->
|
||||||
|
|
||||||
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1"
|
||||||
<children>
|
xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<Pane id="holder" layoutY="28.0" prefHeight="372.0" prefWidth="600.0">
|
<stylesheets>
|
||||||
<children>
|
<URL value="@settings.css"/>
|
||||||
<CheckBox fx:id="autoEnter" layoutX="14.0" layoutY="80.0" text="Автовход на сервер" />
|
</stylesheets>
|
||||||
<CheckBox fx:id="fullScreen" layoutX="13.0" layoutY="185.0" text="Клиент в полный экран" />
|
<Pane id="holder" layoutY="28.0" prefHeight="372.0" prefWidth="600.0">
|
||||||
|
<CheckBox fx:id="autoEnter" layoutX="14.0" layoutY="80.0" text="Автовход на сервер"/>
|
||||||
<!-- RAM settings -->
|
<CheckBox fx:id="fullScreen" layoutX="13.0" layoutY="185.0" text="Клиент в полный экран"/>
|
||||||
<TextFlow layoutX="20.0" layoutY="70.0" />
|
|
||||||
<Slider fx:id="ramSlider" layoutX="18.0" layoutY="36.0" prefHeight="3.0" prefWidth="563.0" />
|
<!-- RAM settings -->
|
||||||
<Separator layoutY="65.0" prefHeight="1.0" prefWidth="600.0" />
|
<TextFlow layoutX="20.0" layoutY="70.0"/>
|
||||||
<Label id="" alignment="CENTER_LEFT" layoutX="18.0" layoutY="16.0" prefHeight="17.0" prefWidth="217.0" text="Лимит памяти для клиента ОЗУ (RAM)" textFill="#2f2f2f" />
|
<Slider fx:id="ramSlider" layoutX="18.0" layoutY="36.0" prefHeight="3.0" prefWidth="563.0"/>
|
||||||
<!-- RAM settings -->
|
<Separator layoutY="65.0" prefHeight="1.0" prefWidth="600.0"/>
|
||||||
|
<Label id="" layoutX="18.0" layoutY="16.0" prefHeight="17.0" prefWidth="217.0"
|
||||||
<Button fx:id="deleteDir" layoutX="15.0" layoutY="333.0" prefHeight="25.0" prefWidth="245.0" text="Очистить данные игровых клиентов" textAlignment="CENTER" wrapText="true">
|
text="Лимит памяти для клиента ОЗУ (RAM)" textFill="#2f2f2f"/>
|
||||||
<font>
|
<!-- RAM settings -->
|
||||||
<Font name="System Bold" size="12.0" />
|
|
||||||
</font></Button>
|
<Button fx:id="deleteDir" layoutX="15.0" layoutY="333.0" prefHeight="25.0" prefWidth="245.0"
|
||||||
<Button fx:id="changeDir" layoutX="14.0" layoutY="229.0" prefHeight="25.0" prefWidth="200.0" text="Сменить директорию загрузки" textAlignment="CENTER" wrapText="true" />
|
text="Очистить данные игровых клиентов" textAlignment="CENTER" wrapText="true">
|
||||||
<Hyperlink id="dirLabel" alignment="TOP_LEFT" layoutX="215.0" layoutY="230.0" prefHeight="23.0" prefWidth="371.0" text="C:/Users" wrapText="true" />
|
<font>
|
||||||
<Button fx:id="apply" defaultButton="true" layoutX="486.0" layoutY="335.0" prefHeight="23.0" prefWidth="100.0" text="Применить" />
|
<Font name="System Bold" size="12.0"/>
|
||||||
<CheckBox id="debug" layoutX="13.0" layoutY="124.0" text="Режим Откладки" />
|
</font>
|
||||||
<Text fill="#8c8c8c" layoutX="38.0" layoutY="95.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение авто-входа означает что вы сразу после загрузки клиента попадете на сервер" wrappingWidth="533.0000102519989" y="15.0" />
|
</Button>
|
||||||
<Text fill="#8c8c8c" layoutX="38.0" layoutY="139.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Режим отладки позволяет просмотреть лог запуска и работы программы в реальном времени прямо из лаунчера, что упрощает поиск нужной информации" wrappingWidth="533.0000016447157" y="15.0" />
|
<Button fx:id="changeDir" layoutX="14.0" layoutY="229.0" prefHeight="25.0" prefWidth="200.0"
|
||||||
<Text fill="#8c8c8c" layoutX="38.0" layoutY="200.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение данной функции позволяет запустить игру сразу в полноэкранном режиме" wrappingWidth="533.0000102519989" y="15.0" />
|
text="Сменить директорию загрузки" textAlignment="CENTER" wrapText="true"/>
|
||||||
<Label fx:id="ramLabel" alignment="CENTER_RIGHT" layoutX="481.0" layoutY="17.0" prefWidth="100.0" text="RAM" />
|
<Hyperlink id="dirLabel" alignment="TOP_LEFT" layoutX="215.0" layoutY="230.0" prefHeight="23.0"
|
||||||
</children>
|
prefWidth="371.0" text="C:/Users" wrapText="true"/>
|
||||||
</Pane>
|
<Button fx:id="apply" defaultButton="true" layoutX="486.0" layoutY="335.0" prefHeight="23.0"
|
||||||
</children>
|
prefWidth="100.0" text="Применить"/>
|
||||||
<stylesheets>
|
<CheckBox id="debug" layoutX="13.0" layoutY="124.0" text="Режим Откладки"/>
|
||||||
<URL value="@settings.css" />
|
<Text fill="#8c8c8c" layoutX="38.0" layoutY="95.0" strokeType="OUTSIDE" strokeWidth="0.0"
|
||||||
</stylesheets>
|
text="Включение авто-входа означает что вы сразу после загрузки клиента попадете на сервер"
|
||||||
|
wrappingWidth="533.0000102519989" y="15.0"/>
|
||||||
|
<Text fill="#8c8c8c" layoutX="38.0" layoutY="139.0" strokeType="OUTSIDE" strokeWidth="0.0"
|
||||||
|
text="Режим отладки позволяет просмотреть лог запуска и работы программы в реальном времени прямо из лаунчера, что упрощает поиск нужной информации"
|
||||||
|
wrappingWidth="533.0000016447157" y="15.0"/>
|
||||||
|
<Text fill="#8c8c8c" layoutX="38.0" layoutY="200.0" strokeType="OUTSIDE" strokeWidth="0.0"
|
||||||
|
text="Включение данной функции позволяет запустить игру сразу в полноэкранном режиме"
|
||||||
|
wrappingWidth="533.0000102519989" y="15.0"/>
|
||||||
|
<Label fx:id="ramLabel" alignment="CENTER_RIGHT" layoutX="481.0" layoutY="17.0" prefWidth="100.0"
|
||||||
|
text="RAM"/>
|
||||||
|
</Pane>
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|
|
@ -10,28 +10,25 @@
|
||||||
|
|
||||||
<!-- DrLeonardo Design -->
|
<!-- DrLeonardo Design -->
|
||||||
|
|
||||||
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1">
|
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/10.0.1"
|
||||||
<children>
|
xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
|
<stylesheets>
|
||||||
<image>
|
<URL value="@update.css"/>
|
||||||
<Image url="@../../images/downloader/background.png" />
|
</stylesheets>
|
||||||
</image>
|
<ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
|
||||||
</ImageView>
|
<Image url="@../../images/downloader/background.png"/>
|
||||||
<Label fx:id="description" layoutX="12.0" layoutY="267.0" prefHeight="98.0" prefWidth="576.0" text="..." textFill="WHITE" />
|
</ImageView>
|
||||||
<ProgressBar fx:id="progress" disable="false" layoutX="-1.0" layoutY="376.0" opacity="1.0" prefHeight="24.0" prefWidth="600.0" progress="1.0" style="" />
|
<Label fx:id="description" layoutX="12.0" layoutY="267.0" prefHeight="98.0" prefWidth="576.0" text="..."
|
||||||
<!-- Update controls -->
|
textFill="WHITE"/>
|
||||||
<Label fx:id="utitle" alignment="TOP_LEFT" layoutX="15.0" layoutY="236.0" prefHeight="30.0" prefWidth="470.0" text="Обновление..." textFill="WHITE">
|
<ProgressBar fx:id="progress" layoutX="-1.0" layoutY="376.0" prefHeight="24.0" prefWidth="600.0" progress="1.0"/>
|
||||||
<font>
|
<!-- Update controls -->
|
||||||
<Font name="System Bold" size="20.0" />
|
<Label fx:id="utitle" alignment="TOP_LEFT" layoutX="15.0" layoutY="236.0" prefHeight="30.0" prefWidth="470.0"
|
||||||
</font>
|
text="Обновление..." textFill="WHITE">
|
||||||
</Label>
|
<font>
|
||||||
<ImageView fitHeight="160.0" fitWidth="160.0" layoutX="219.0" layoutY="70.0" y="-6.0">
|
<Font name="System Bold" size="20.0"/>
|
||||||
<image>
|
</font>
|
||||||
<Image url="@../../images/icons/loading.gif" />
|
</Label>
|
||||||
</image>
|
<ImageView fitHeight="160.0" fitWidth="160.0" layoutX="219.0" layoutY="70.0" y="-6.0">
|
||||||
</ImageView>
|
<Image url="@../../images/icons/loading.gif"/>
|
||||||
</children>
|
</ImageView>
|
||||||
<stylesheets>
|
|
||||||
<URL value="@update.css" />
|
|
||||||
</stylesheets>
|
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
package ru.gravit.launcher;
|
package ru.gravit.launcher;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
import cpw.mods.fml.SafeExitJVMLegacy;
|
import cpw.mods.fml.SafeExitJVMLegacy;
|
||||||
import net.minecraftforge.fml.SafeExitJVM;
|
import net.minecraftforge.fml.SafeExitJVM;
|
||||||
|
@ -12,7 +10,6 @@
|
||||||
import ru.gravit.launcher.hasher.HashedDir;
|
import ru.gravit.launcher.hasher.HashedDir;
|
||||||
import ru.gravit.utils.NativeJVMHalt;
|
import ru.gravit.utils.NativeJVMHalt;
|
||||||
import ru.gravit.utils.helper.*;
|
import ru.gravit.utils.helper.*;
|
||||||
import ru.gravit.utils.helper.SecurityHelper.DigestAlgorithm;
|
|
||||||
import ru.zaxar163.GuardBind;
|
import ru.zaxar163.GuardBind;
|
||||||
|
|
||||||
public class AvanguardStarter {
|
public class AvanguardStarter {
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
import ru.gravit.launcher.Launcher;
|
import ru.gravit.launcher.Launcher;
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
import ru.gravit.launcher.LauncherAPI;
|
||||||
import ru.gravit.launcher.LauncherConfig;
|
import ru.gravit.launcher.LauncherConfig;
|
||||||
import ru.gravit.utils.helper.JVMHelper;
|
|
||||||
import ru.gravit.utils.helper.SecurityHelper;
|
import ru.gravit.utils.helper.SecurityHelper;
|
||||||
import ru.gravit.utils.helper.VerifyHelper;
|
import ru.gravit.utils.helper.VerifyHelper;
|
||||||
import ru.gravit.launcher.profiles.PlayerProfile;
|
import ru.gravit.launcher.profiles.PlayerProfile;
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
package ru.gravit.launcher.request.auth;
|
package ru.gravit.launcher.request.auth;
|
||||||
|
|
||||||
import jdk.nashorn.internal.ir.RuntimeNode;
|
|
||||||
import ru.gravit.launcher.Launcher;
|
import ru.gravit.launcher.Launcher;
|
||||||
import ru.gravit.launcher.request.Request;
|
import ru.gravit.launcher.request.Request;
|
||||||
import ru.gravit.launcher.request.RequestType;
|
import ru.gravit.launcher.request.RequestType;
|
||||||
import ru.gravit.launcher.serialize.HInput;
|
import ru.gravit.launcher.serialize.HInput;
|
||||||
import ru.gravit.launcher.serialize.HOutput;
|
import ru.gravit.launcher.serialize.HOutput;
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,10 @@
|
||||||
import ru.gravit.launcher.Launcher;
|
import ru.gravit.launcher.Launcher;
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
import ru.gravit.launcher.LauncherAPI;
|
||||||
import ru.gravit.launcher.LauncherConfig;
|
import ru.gravit.launcher.LauncherConfig;
|
||||||
import ru.gravit.launcher.profiles.ClientProfile;
|
|
||||||
import ru.gravit.launcher.request.Request;
|
import ru.gravit.launcher.request.Request;
|
||||||
import ru.gravit.launcher.request.RequestType;
|
import ru.gravit.launcher.request.RequestType;
|
||||||
import ru.gravit.launcher.serialize.HInput;
|
import ru.gravit.launcher.serialize.HInput;
|
||||||
import ru.gravit.launcher.serialize.HOutput;
|
import ru.gravit.launcher.serialize.HOutput;
|
||||||
import ru.gravit.launcher.serialize.signed.SignedObjectHolder;
|
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
import ru.gravit.utils.helper.IOHelper;
|
||||||
import ru.gravit.utils.helper.JVMHelper;
|
import ru.gravit.utils.helper.JVMHelper;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
|
@ -17,7 +15,6 @@
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.security.SignatureException;
|
import java.security.SignatureException;
|
||||||
import java.security.interfaces.RSAPublicKey;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
import javax.websocket.OnOpen;
|
import javax.websocket.OnOpen;
|
||||||
import javax.websocket.Session;
|
import javax.websocket.Session;
|
||||||
|
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* public class Client {
|
* public class Client {
|
||||||
*
|
*
|
||||||
|
|
|
@ -12,6 +12,7 @@ public JsonRequestAdapter(ClientWebSocketService service) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public RequestInterface deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
public RequestInterface deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||||
String typename = json.getAsJsonObject().getAsJsonPrimitive(PROP_NAME).getAsString();
|
String typename = json.getAsJsonObject().getAsJsonPrimitive(PROP_NAME).getAsString();
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package ru.gravit.launcher.server;
|
package ru.gravit.launcher.server;
|
||||||
|
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package ru.gravit.launcher.modules;
|
package ru.gravit.launcher.modules;
|
||||||
|
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.utils.PublicURLClassLoader;
|
import ru.gravit.utils.PublicURLClassLoader;
|
||||||
import ru.gravit.utils.helper.IOHelper;
|
import ru.gravit.utils.helper.IOHelper;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.security.SignatureException;
|
import java.security.SignatureException;
|
||||||
import java.security.interfaces.RSAPrivateKey;
|
|
||||||
import java.security.interfaces.RSAPublicKey;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class DigestBytesHolder extends StreamObject {
|
public class DigestBytesHolder extends StreamObject {
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
|
|
||||||
public class Downloader implements Runnable {
|
public class Downloader implements Runnable {
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public static interface Handler {
|
public interface Handler {
|
||||||
public void check(Certificate[] certs) throws IOException;
|
void check(Certificate[] certs) throws IOException;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Map<String, String> requestClient = Collections.singletonMap("User-Agent",
|
public static final Map<String, String> requestClient = Collections.singletonMap("User-Agent",
|
||||||
|
|
|
@ -19,7 +19,6 @@ public Downloader getDownloader() {
|
||||||
public void interrupt() {
|
public void interrupt() {
|
||||||
runnable.interrupt.set(true);
|
runnable.interrupt.set(true);
|
||||||
while (!runnable.interrupted.get()) {
|
while (!runnable.interrupted.get()) {
|
||||||
;
|
|
||||||
}
|
}
|
||||||
super.interrupt();
|
super.interrupt();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
package ru.gravit.utils.helper;
|
package ru.gravit.utils.helper;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.StringTokenizer;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
public class EnvHelper {
|
public class EnvHelper {
|
||||||
public static final String[] toTest;
|
public static final String[] toTest;
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
import java.lang.management.RuntimeMXBean;
|
import java.lang.management.RuntimeMXBean;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.security.cert.Certificate;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
Loading…
Reference in a new issue