From f9b8bd2947c5ec2765dc638e670512139c9c6333 Mon Sep 17 00:00:00 2001 From: Gravit Date: Thu, 8 Nov 2018 19:28:31 +0700 Subject: [PATCH] IDEA Refractoring --- .../ru/gravit/launchserver/LaunchServer.java | 1 - .../launchserver/auth/AuthException.java | 2 - .../gravit/launchserver/auth/AuthLimiter.java | 1 - .../launchserver/auth/ClientPermissions.java | 2 +- .../launchserver/auth/MySQLSourceConfig.java | 1 - .../auth/handler/AuthHandler.java | 1 - .../auth/handler/CachedAuthHandler.java | 1 - .../auth/handler/FileAuthHandler.java | 1 - .../auth/handler/NullAuthHandler.java | 1 - .../launchserver/auth/hwid/HWIDHandler.java | 1 - .../auth/provider/AcceptAuthProvider.java | 1 - .../auth/provider/AuthProvider.java | 1 - .../auth/provider/DigestAuthProvider.java | 1 - .../auth/provider/NullAuthProvider.java | 1 - .../binary/EXEL4JLauncherBinary.java | 1 - .../launchserver/binary/LauncherBinary.java | 2 - .../gravit/launchserver/command/Command.java | 1 - .../command/CommandException.java | 2 - .../command/basic/TestCommand.java | 1 - .../command/handler/CommandHandler.java | 1 - .../command/hash/DownloadAssetCommand.java | 1 - .../command/hash/DownloadClientCommand.java | 1 - .../command/hash/IndexAssetCommand.java | 1 - .../fileserver/FileServerHandler.java | 1 - .../manangers/SessionManager.java | 1 - .../response/auth/CheckServerResponse.java | 1 - .../response/auth/SetProfileResponse.java | 1 - .../response/update/LauncherResponse.java | 7 -- .../update/LegacyLauncherResponse.java | 5 - .../socket/NettyServerSocketHandler.java | 3 - .../socket/ServerSocketHandler.java | 1 - .../websocket/json/JsonResponseAdapter.java | 1 + .../websocket/json/JsonResponseInterface.java | 1 - .../json/admin/ExecCommandResponse.java | 1 - .../json/auth/JoinServerResponse.java | 2 - .../texture/NullTextureProvider.java | 1 - .../launchserver/texture/TextureProvider.java | 1 - Launcher/runtime/dialog/login.fxml | 47 +++---- Launcher/runtime/dialog/mainmenu.fxml | 115 +++++++++--------- .../dialog/overlay/options/options.fxml | 26 ++-- .../dialog/overlay/processing/processing.fxml | 35 +++--- .../dialog/overlay/settings/settings.fxml | 74 ++++++----- .../runtime/dialog/overlay/update/update.fxml | 45 ++++--- .../ru/gravit/launcher/AvanguardStarter.java | 3 - .../launcher/request/auth/AuthRequest.java | 1 - .../request/auth/ChangeServerRequest.java | 2 - .../request/update/LauncherRequest.java | 3 - .../request/websockets/ClientJSONPoint.java | 2 - .../websockets/JsonRequestAdapter.java | 1 + .../gravit/launcher/server/ServerAgent.java | 1 - .../launcher/modules/SimpleModuleManager.java | 1 - .../serialize/signed/DigestBytesHolder.java | 2 - .../gravit/utils/downloader/Downloader.java | 4 +- .../utils/downloader/DownloadingThread.java | 1 - .../ru/gravit/utils/helper/EnvHelper.java | 3 - .../ru/gravit/utils/helper/JVMHelper.java | 2 - 56 files changed, 180 insertions(+), 242 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index d9cb4933..68e7a86c 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -31,7 +31,6 @@ import java.util.zip.CRC32; import ru.gravit.launcher.Launcher; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.hasher.HashedDir; import ru.gravit.launcher.serialize.config.entry.*; import ru.gravit.launchserver.manangers.MirrorManager; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthException.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthException.java index 825a691a..60256964 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthException.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthException.java @@ -2,8 +2,6 @@ import java.io.IOException; -import ru.gravit.launcher.LauncherAPI; - public final class AuthException extends IOException { private static final long serialVersionUID = -2586107832847245863L; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthLimiter.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthLimiter.java index 2b0cbbd3..a66bbff3 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthLimiter.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthLimiter.java @@ -2,7 +2,6 @@ import java.util.HashMap; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.NeedGarbageCollection; import ru.gravit.launchserver.LaunchServer; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/ClientPermissions.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/ClientPermissions.java index e888b325..20808743 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/ClientPermissions.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/ClientPermissions.java @@ -10,7 +10,7 @@ public ClientPermissions() { canServer = false; } public ClientPermissions(long data) { - canAdmin = (data & (1 << 0)) != 0; + canAdmin = (data & (1)) != 0; canServer = (data & (1 << 1)) != 0; } public static ClientPermissions getSuperuserAccount() diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java index 6f7a1c20..43df5421 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/MySQLSourceConfig.java @@ -9,7 +9,6 @@ import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.launcher.serialize.config.ConfigObject; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/AuthHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/AuthHandler.java index 5f05977b..41e7bd8f 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/AuthHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/AuthHandler.java @@ -6,7 +6,6 @@ import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.launcher.serialize.config.ConfigObject; import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/CachedAuthHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/CachedAuthHandler.java index 15061717..e7a65f4a 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/CachedAuthHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/CachedAuthHandler.java @@ -6,7 +6,6 @@ import java.util.Objects; import java.util.UUID; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.NeedGarbageCollection; import ru.gravit.launcher.managers.GarbageManager; import ru.gravit.launcher.serialize.config.entry.BooleanConfigEntry; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/FileAuthHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/FileAuthHandler.java index db5421f7..44e7a89b 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/FileAuthHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/FileAuthHandler.java @@ -10,7 +10,6 @@ import java.util.UUID; import java.util.concurrent.locks.ReentrantReadWriteLock; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.utils.helper.CommonHelper; import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.LogHelper; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/NullAuthHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/NullAuthHandler.java index 1100c345..eceb93f8 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/NullAuthHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/NullAuthHandler.java @@ -4,7 +4,6 @@ import java.util.Objects; import java.util.UUID; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry; import ru.gravit.launchserver.auth.provider.AuthProviderResult; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/hwid/HWIDHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/hwid/HWIDHandler.java index 03013a50..ffcaa4de 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/hwid/HWIDHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/hwid/HWIDHandler.java @@ -5,7 +5,6 @@ import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.launcher.serialize.config.ConfigObject; import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AcceptAuthProvider.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AcceptAuthProvider.java index 8136330f..0e8bcbb5 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AcceptAuthProvider.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AcceptAuthProvider.java @@ -1,7 +1,6 @@ package ru.gravit.launchserver.auth.provider; import ru.gravit.launcher.serialize.config.entry.BooleanConfigEntry; -import ru.gravit.launcher.serialize.config.entry.StringConfigEntry; import ru.gravit.launchserver.LaunchServer; import ru.gravit.utils.helper.SecurityHelper; import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AuthProvider.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AuthProvider.java index c0991613..0fdac906 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AuthProvider.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AuthProvider.java @@ -5,7 +5,6 @@ import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.auth.handler.AuthHandler; import ru.gravit.utils.helper.VerifyHelper; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/DigestAuthProvider.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/DigestAuthProvider.java index cd009718..c6e5e031 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/DigestAuthProvider.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/DigestAuthProvider.java @@ -1,6 +1,5 @@ package ru.gravit.launchserver.auth.provider; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.launchserver.LaunchServer; import ru.gravit.utils.helper.SecurityHelper; import ru.gravit.utils.helper.SecurityHelper.DigestAlgorithm; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/NullAuthProvider.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/NullAuthProvider.java index 9e6a125b..7ababad1 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/NullAuthProvider.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/NullAuthProvider.java @@ -3,7 +3,6 @@ import java.io.IOException; import java.util.Objects; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.launchserver.LaunchServer; import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/EXEL4JLauncherBinary.java b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/EXEL4JLauncherBinary.java index d9ab9e63..fe8091db 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/EXEL4JLauncherBinary.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/EXEL4JLauncherBinary.java @@ -4,7 +4,6 @@ import java.nio.file.Path; import ru.gravit.launcher.Launcher; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.LogHelper; import ru.gravit.launchserver.LaunchServer; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/LauncherBinary.java b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/LauncherBinary.java index 676248c8..6fb49b93 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/LauncherBinary.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/LauncherBinary.java @@ -3,10 +3,8 @@ import java.io.IOException; import java.nio.file.Path; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.serialize.signed.DigestBytesHolder; import ru.gravit.utils.helper.IOHelper; -import ru.gravit.launcher.serialize.signed.SignedBytesHolder; import ru.gravit.launchserver.LaunchServer; import ru.gravit.utils.helper.SecurityHelper; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/Command.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/Command.java index 18181170..8f0041a0 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/Command.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/Command.java @@ -2,7 +2,6 @@ import java.util.UUID; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.launchserver.LaunchServer; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/CommandException.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/CommandException.java index 19e0bb96..514a4571 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/CommandException.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/CommandException.java @@ -1,7 +1,5 @@ package ru.gravit.launchserver.command; -import ru.gravit.launcher.LauncherAPI; - public final class CommandException extends Exception { private static final long serialVersionUID = -6588814993972117772L; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/basic/TestCommand.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/basic/TestCommand.java index 83cf855c..edb653fa 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/basic/TestCommand.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/basic/TestCommand.java @@ -3,7 +3,6 @@ import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.command.Command; import ru.gravit.launchserver.socket.NettyServerSocketHandler; -import ru.gravit.launchserver.socket.websocket.WebSocketService; import ru.gravit.utils.helper.CommonHelper; public class TestCommand extends Command { diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java index e77304da..e9f56be8 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java @@ -11,7 +11,6 @@ import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.launchserver.command.basic.*; import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.VerifyHelper; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/DownloadAssetCommand.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/DownloadAssetCommand.java index 5705445e..a1fb162d 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/DownloadAssetCommand.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/DownloadAssetCommand.java @@ -1,6 +1,5 @@ package ru.gravit.launchserver.command.hash; -import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; import java.util.Collections; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/DownloadClientCommand.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/DownloadClientCommand.java index 53196bde..f86ead41 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/DownloadClientCommand.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/DownloadClientCommand.java @@ -3,7 +3,6 @@ import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; -import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; import java.util.Collections; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/IndexAssetCommand.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/IndexAssetCommand.java index 205572c9..041a6b45 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/IndexAssetCommand.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/hash/IndexAssetCommand.java @@ -13,7 +13,6 @@ import com.eclipsesource.json.JsonObject; import com.eclipsesource.json.WriterConfig; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.SecurityHelper; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/fileserver/FileServerHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/fileserver/FileServerHandler.java index 2aa9f169..d33e3edc 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/fileserver/FileServerHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/fileserver/FileServerHandler.java @@ -23,7 +23,6 @@ import io.netty.handler.ssl.SslHandler; import io.netty.handler.stream.ChunkedFile; import io.netty.util.CharsetUtil; -import io.netty.util.internal.SystemPropertyUtil; import javax.activation.MimetypesFileTypeMap; import java.io.File; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/SessionManager.java b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/SessionManager.java index 6674fa46..8ac925ed 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/SessionManager.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/SessionManager.java @@ -3,7 +3,6 @@ import java.util.HashSet; import java.util.Set; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.NeedGarbageCollection; import ru.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/CheckServerResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/CheckServerResponse.java index 1bbda10b..1026343e 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/CheckServerResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/CheckServerResponse.java @@ -3,7 +3,6 @@ import java.io.IOException; import java.util.UUID; -import ru.gravit.launchserver.socket.Client; import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.launcher.serialize.HInput; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/SetProfileResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/SetProfileResponse.java index f0f6cb8a..8251432f 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/SetProfileResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/SetProfileResponse.java @@ -6,7 +6,6 @@ import ru.gravit.launcher.serialize.SerializeLimits; import ru.gravit.launcher.serialize.signed.SignedObjectHolder; import ru.gravit.launchserver.LaunchServer; -import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.response.Response; import ru.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/response/update/LauncherResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/response/update/LauncherResponse.java index 1f170fde..d601f468 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/response/update/LauncherResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/response/update/LauncherResponse.java @@ -1,21 +1,14 @@ package ru.gravit.launchserver.response.update; -import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HOutput; 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.manangers.SessionManager; import ru.gravit.launchserver.response.Response; import ru.gravit.launchserver.socket.Client; -import ru.gravit.utils.helper.SecurityHelper; import java.io.IOException; -import java.security.SignatureException; import java.util.Arrays; -import java.util.Collection; public final class LauncherResponse extends Response { diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/response/update/LegacyLauncherResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/response/update/LegacyLauncherResponse.java index 6f50ba53..b3542dad 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/response/update/LegacyLauncherResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/response/update/LegacyLauncherResponse.java @@ -1,16 +1,11 @@ package ru.gravit.launchserver.response.update; import java.io.IOException; -import java.util.Collection; -import ru.gravit.launcher.serialize.signed.DigestBytesHolder; import ru.gravit.launchserver.binary.LauncherBinary; import ru.gravit.utils.helper.SecurityHelper; -import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.serialize.HInput; 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.response.Response; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/NettyServerSocketHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/NettyServerSocketHandler.java index 60da8971..aca62c6d 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/NettyServerSocketHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/NettyServerSocketHandler.java @@ -12,17 +12,14 @@ import io.netty.handler.codec.http.HttpServerCodec; import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler; 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.LoggingHandler; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.launcher.ssl.LauncherKeyStore; import ru.gravit.launcher.ssl.LauncherTrustManager; import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.fileserver.FileServerHandler; import ru.gravit.launchserver.response.Response; 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.LogHelper; import ru.gravit.utils.helper.VerifyHelper; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/ServerSocketHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/ServerSocketHandler.java index 80d9cff0..7ff3825f 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/ServerSocketHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/ServerSocketHandler.java @@ -10,7 +10,6 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.utils.helper.CommonHelper; import ru.gravit.utils.helper.LogHelper; import ru.gravit.launcher.managers.GarbageManager; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/JsonResponseAdapter.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/JsonResponseAdapter.java index 24aa938a..f967c952 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/JsonResponseAdapter.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/JsonResponseAdapter.java @@ -13,6 +13,7 @@ public JsonResponseAdapter(WebSocketService service) { this.service = service; } + @SuppressWarnings("unchecked") @Override public JsonResponseInterface deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { String typename = json.getAsJsonObject().getAsJsonPrimitive(PROP_NAME).getAsString(); diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/JsonResponseInterface.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/JsonResponseInterface.java index 20ea0a38..948d448c 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/JsonResponseInterface.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/JsonResponseInterface.java @@ -1,7 +1,6 @@ package ru.gravit.launchserver.socket.websocket.json; import io.netty.channel.ChannelHandlerContext; -import io.netty.handler.codec.http.websocketx.WebSocketFrame; import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.websocket.WebSocketService; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/admin/ExecCommandResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/admin/ExecCommandResponse.java index 8094881b..b9da7d05 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/admin/ExecCommandResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/admin/ExecCommandResponse.java @@ -2,7 +2,6 @@ import io.netty.channel.ChannelHandlerContext; import ru.gravit.launchserver.LaunchServer; -import ru.gravit.launchserver.command.handler.CommandHandler; import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.websocket.WebSocketService; import ru.gravit.launchserver.socket.websocket.json.JsonResponseInterface; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java index 20f27fdc..84bf30fa 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java @@ -8,8 +8,6 @@ import ru.gravit.launchserver.socket.websocket.json.JsonResponseInterface; import ru.gravit.utils.helper.LogHelper; -import java.util.UUID; - public class JoinServerResponse implements JsonResponseInterface { public String serverID; public String accessToken; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/texture/NullTextureProvider.java b/LaunchServer/src/main/java/ru/gravit/launchserver/texture/NullTextureProvider.java index dd7b868b..e6fb354e 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/texture/NullTextureProvider.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/texture/NullTextureProvider.java @@ -4,7 +4,6 @@ import java.util.Objects; import java.util.UUID; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.launcher.profiles.Texture; import ru.gravit.launcher.serialize.config.entry.BlockConfigEntry; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/texture/TextureProvider.java b/LaunchServer/src/main/java/ru/gravit/launchserver/texture/TextureProvider.java index d5b901ae..46ce431f 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/texture/TextureProvider.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/texture/TextureProvider.java @@ -6,7 +6,6 @@ import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; -import ru.gravit.launcher.LauncherAPI; import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.launcher.profiles.Texture; import ru.gravit.launcher.serialize.config.ConfigObject; diff --git a/Launcher/runtime/dialog/login.fxml b/Launcher/runtime/dialog/login.fxml index 0608f508..b8f955b3 100644 --- a/Launcher/runtime/dialog/login.fxml +++ b/Launcher/runtime/dialog/login.fxml @@ -12,28 +12,31 @@ - - - - - - - - - - - - - - +