From 06e9bc857854a09eb42ef2c12b37c3e4fa6144b5 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Mon, 3 Apr 2023 13:04:12 +0700 Subject: [PATCH] [ANY] IDEA code inspect --- LaunchServer/build.gradle | 19 +- .../pro/gravit/launchserver/LaunchServer.java | 1 - .../launchserver/LaunchServerStarter.java | 2 - .../launchserver/asm/InjectClassAcceptor.java | 6 +- .../launchserver/auth/AuthException.java | 2 + .../launchserver/auth/AuthProviderPair.java | 12 - .../auth/core/AbstractSQLCoreProvider.java | 16 +- .../auth/core/AuthCoreProvider.java | 4 +- .../auth/core/HttpAuthCoreProvider.java | 26 +-- .../auth/core/MemoryAuthCoreProvider.java | 24 +- .../auth/core/MergeAuthCoreProvider.java | 6 +- .../auth/core/RejectAuthCoreProvider.java | 6 +- .../interfaces/provider/AuthSupportExit.java | 4 +- .../auth/password/JsonPasswordVerifier.java | 2 +- .../auth/protect/AdvancedProtectHandler.java | 21 -- .../auth/protect/NoProtectHandler.java | 4 - .../auth/protect/ProtectHandler.java | 2 - .../auth/protect/StdProtectHandler.java | 8 +- .../auth/texture/JsonTextureProvider.java | 8 +- .../binary/tasks/AttachJarsTask.java | 3 - .../binary/tasks/SignJarTask.java | 2 +- .../command/basic/DebugCommand.java | 2 +- .../command/handler/CommandHandler.java | 1 - .../command/service/SecurityCheckCommand.java | 4 +- .../command/service/SignJarCommand.java | 2 +- .../command/service/TokenCommand.java | 2 +- .../components/ProGuardComponent.java | 4 +- .../components/WhitelistComponent.java | 6 +- .../config/LaunchServerConfig.java | 4 +- .../launchserver/helper/HttpHelper.java | 4 +- .../manangers/FeaturesManager.java | 6 +- .../manangers/KeyAgreementManager.java | 2 +- .../socket/LauncherNettyServer.java | 7 +- .../launchserver/socket/WebSocketService.java | 1 - .../socket/handlers/NettyWebAPIHandler.java | 7 +- .../response/auth/AdditionalDataResponse.java | 3 +- .../socket/response/auth/AuthResponse.java | 2 +- .../response/auth/CurrentUserResponse.java | 4 +- .../auth/FetchClientProfileKeyResponse.java | 2 +- .../response/auth/RefreshTokenResponse.java | 2 +- .../socket/response/auth/RestoreResponse.java | 4 + .../response/auth/RestoreSessionResponse.java | 2 +- .../management/GetPublicKeyResponse.java | 2 +- .../profile/BatchProfileByUsername.java | 2 +- .../profile/ProfileByUUIDResponse.java | 2 +- .../response/profile/ProfileByUsername.java | 2 +- .../response/update/LauncherResponse.java | 2 - .../launchserver/ASMTransformersTest.java | 2 +- .../launchserver/ConfigurationTest.java | 6 + .../impl/TestLaunchServerConfigManager.java | 10 +- Launcher/build.gradle | 8 +- .../launcher/ClientLauncherWrapper.java | 2 - .../pro/gravit/launcher/LauncherEngine.java | 2 - .../launcher/client/ClientClassLoader.java | 4 +- .../client/ClientLauncherProcess.java | 12 +- .../launcher/console/GetPublicKeyCommand.java | 2 +- .../launcher/console/ModulesCommand.java | 2 +- .../test/PrintHardwareInfoCommand.java | 2 +- .../launcher/gui/NoRuntimeProvider.java | 4 +- .../gravit/launcher/gui/RuntimeProvider.java | 4 +- .../pro/gravit/launcher/utils/DirWatcher.java | 4 - .../gravit/launcher/utils/NativeJVMHalt.java | 2 - LauncherAPI/build.gradle | 4 +- .../launcher/modules/LauncherModule.java | 12 +- .../launcher/profiles/ClientProfile.java | 3 +- .../profiles/ClientProfileBuilder.java | 60 ++--- .../optional/triggers/JavaTrigger.java | 3 +- .../pro/gravit/launcher/request/Request.java | 4 +- .../launcher/request/RequestService.java | 2 +- .../request/websockets/ClientJSONPoint.java | 4 +- .../websockets/ClientWebSocketService.java | 16 -- .../websockets/OfflineRequestService.java | 3 +- .../websockets/StdWebSocketService.java | 10 +- .../websockets/VoidRequestService.java | 3 +- .../websockets/WebSocketClientHandler.java | 4 +- LauncherCore/build.gradle | 4 +- .../pro/gravit/launcher/AsyncDownloader.java | 4 +- .../pro/gravit/launcher/hasher/HashedDir.java | 2 +- .../main/java/pro/gravit/utils/BiHookSet.java | 4 +- .../java/pro/gravit/utils/Downloader.java | 2 +- .../main/java/pro/gravit/utils/HookSet.java | 4 +- .../gravit/utils/PublicURLClassLoader.java | 2 - .../gravit/utils/command/CommandHandler.java | 4 +- .../utils/command/JLineCommandHandler.java | 14 -- .../pro/gravit/utils/helper/IOHelper.java | 8 +- .../pro/gravit/utils/helper/JarHelper.java | 4 +- .../pro/gravit/utils/helper/JavaHelper.java | 46 ++-- .../pro/gravit/utils/helper/LogHelper.java | 2 +- .../pro/gravit/utils/helper/UnpackHelper.java | 11 +- .../pro/gravit/utils/helper/VerifyHelper.java | 4 +- .../utils/logging/SimpleLogHelperImpl.java | 3 +- .../java11/pro/gravit/utils/Downloader.java | 1 - ServerWrapper/build.gradle | 4 +- .../gravit/launcher/server/ServerWrapper.java | 4 +- .../server/ServerWrapperGsonManager.java | 1 - .../authlib/DownloadContextModifier.java | 1 - .../server/authlib/InstallAuthlib.java | 4 +- .../server/authlib/LibrariesLstModifier.java | 3 +- .../launcher/server/launch/ModuleLaunch.java | 2 +- .../server/setup/ServerWrapperSetup.java | 2 - build.gradle | 10 +- compat/BungeeCord.patch | 211 ------------------ compat/LaunchWrapper.patch | 17 -- compat/auth/asframework.php | 50 ----- compat/auth/dle.php | 83 ------- compat/auth/dle.sql | 1 - compat/auth/ipb.php | 28 --- compat/auth/ips.php | 22 -- compat/auth/joomla.sql | 1 - .../authcontroller/LauncherAuthController.php | 36 --- compat/auth/laravel/authcontroller/README.MD | 10 - ...020_03_05_151322_add_permission_collum.php | 32 --- .../2020_03_04_172425_create_hwid_table.php | 36 --- ..._03_05_140131_add_auth_handler_collums.php | 36 --- ..._03_05_142041_add_hwid_handler_collums.php | 32 --- compat/auth/laravel/migrations/README.MD | 1 - compat/auth/phpbb.php | 20 -- compat/auth/uuid/ReversibleUUIDs.java | 19 -- compat/auth/uuid/uuidgen.sql | 8 - compat/auth/uuid/uuidgen_offline.sql | 11 - compat/auth/wordpress.php | 15 -- compat/auth/xenforo.php | 47 ---- compat/auth/yii2/MinecraftController.php | 48 ---- compat/authlib/GameProfile-combined.class | Bin 2323 -> 0 bytes .../MinecraftSessionService-combined.class | Bin 1177 -> 0 bytes compat/authlib/README.md | 15 -- compat/authlib/authlib-clean.jar | Bin 23983 -> 0 bytes compat/hibernate.sql | 75 ------- modules | 2 +- 129 files changed, 215 insertions(+), 1244 deletions(-) delete mode 100644 compat/BungeeCord.patch delete mode 100644 compat/LaunchWrapper.patch delete mode 100644 compat/auth/asframework.php delete mode 100644 compat/auth/dle.php delete mode 100644 compat/auth/dle.sql delete mode 100644 compat/auth/ipb.php delete mode 100644 compat/auth/ips.php delete mode 100644 compat/auth/joomla.sql delete mode 100644 compat/auth/laravel/authcontroller/LauncherAuthController.php delete mode 100644 compat/auth/laravel/authcontroller/README.MD delete mode 100644 compat/auth/laravel/authcontroller/migrations/2020_03_05_151322_add_permission_collum.php delete mode 100644 compat/auth/laravel/migrations/2020_03_04_172425_create_hwid_table.php delete mode 100644 compat/auth/laravel/migrations/2020_03_05_140131_add_auth_handler_collums.php delete mode 100644 compat/auth/laravel/migrations/2020_03_05_142041_add_hwid_handler_collums.php delete mode 100644 compat/auth/laravel/migrations/README.MD delete mode 100644 compat/auth/phpbb.php delete mode 100644 compat/auth/uuid/ReversibleUUIDs.java delete mode 100644 compat/auth/uuid/uuidgen.sql delete mode 100644 compat/auth/uuid/uuidgen_offline.sql delete mode 100644 compat/auth/wordpress.php delete mode 100644 compat/auth/xenforo.php delete mode 100644 compat/auth/yii2/MinecraftController.php delete mode 100644 compat/authlib/GameProfile-combined.class delete mode 100644 compat/authlib/MinecraftSessionService-combined.class delete mode 100644 compat/authlib/README.md delete mode 100644 compat/authlib/authlib-clean.jar delete mode 100644 compat/hibernate.sql diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index ce6a9222..db37159c 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -50,17 +50,18 @@ } } -task sourcesJar(type: Jar) { +tasks.register('sourcesJar', Jar) { from sourceSets.main.allJava archiveClassifier.set('sources') } -task javadocJar(type: Jar) { +tasks.register('javadocJar', Jar) { from javadoc archiveClassifier.set('javadoc') } -task cleanjar(type: Jar, dependsOn: jar) { +tasks.register('cleanjar', Jar) { + dependsOn jar archiveClassifier.set('clean') manifest.attributes("Main-Class": mainClassName, "Premain-Class": mainAgentName, @@ -117,13 +118,13 @@ pack project(':LauncherAPI') compileOnlyA 'org.apache.logging.log4j:log4j-core:2.14.1' } -task hikari(type: Copy) { +tasks.register('hikari', Copy) { duplicatesStrategy = 'EXCLUDE' into "$buildDir/libs/libraries/hikaricp" from configurations.hikari } -task launch4j(type: Copy) { +tasks.register('launch4j', Copy) { duplicatesStrategy = 'EXCLUDE' into "$buildDir/libs/libraries/launch4j" from(configurations.launch4j.collect { @@ -141,20 +142,20 @@ task launch4j(type: Copy) { } } -task dumpLibs(type: Copy) { +tasks.register('dumpLibs', Copy) { duplicatesStrategy = 'EXCLUDE' dependsOn tasks.hikari, tasks.launch4j into "$buildDir/libs/libraries" from configurations.bundleOnly } -task dumpCompileOnlyLibs(type: Copy) { +tasks.register('dumpCompileOnlyLibs', Copy) { duplicatesStrategy = 'EXCLUDE' into "$buildDir/libs/launcher-libraries-compile" from configurations.compileOnlyA } -task bundle(type: Zip) { +tasks.register('bundle', Zip) { duplicatesStrategy = 'EXCLUDE' dependsOn parent.childProjects.Launcher.tasks.build, tasks.dumpLibs, tasks.dumpCompileOnlyLibs, tasks.jar archiveFileName = 'LaunchServer.zip' @@ -165,7 +166,7 @@ task bundle(type: Zip) { from(parent.childProjects.Launcher.tasks.dumpLibs) { into 'launcher-libraries' } } -task dumpClientLibs(type: Copy) { +tasks.register('dumpClientLibs', Copy) { dependsOn parent.childProjects.Launcher.tasks.build into "$buildDir/libs/launcher-libraries" from parent.childProjects.Launcher.tasks.dumpLibs diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index 6f25a6e6..e370576a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -121,7 +121,6 @@ public final class LaunchServer implements Runnable, AutoCloseable, Reconfigurab // Updates and profiles private volatile Set profilesList; - @SuppressWarnings("deprecation") public LaunchServer(LaunchServerDirectories directories, LaunchServerEnv env, LaunchServerConfig config, LaunchServerRuntimeConfig runtimeConfig, LaunchServerConfigManager launchServerConfigManager, LaunchServerModulesManager modulesManager, KeyAgreementManager keyAgreementManager, CommandHandler commandHandler, CertificateManager certificateManager) throws IOException { this.dir = directories.dir; this.tmpDir = directories.tmpDir; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java index ec8d5479..6faec029 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServerStarter.java @@ -21,7 +21,6 @@ import pro.gravit.launchserver.manangers.LaunchServerGsonManager; import pro.gravit.launchserver.modules.impl.LaunchServerModulesManager; import pro.gravit.launchserver.socket.WebSocketService; -import pro.gravit.utils.Version; import pro.gravit.utils.command.CommandHandler; import pro.gravit.utils.command.JLineCommandHandler; import pro.gravit.utils.command.StdCommandHandler; @@ -202,7 +201,6 @@ public static void initGson(LaunchServerModulesManager modulesManager) { Launcher.gsonManager.initGson(); } - @SuppressWarnings("deprecation") public static void registerAll() { AuthCoreProvider.registerProviders(); PasswordVerifier.registerProviders(); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java b/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java index 2beaa2e5..4f698cc5 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java @@ -65,7 +65,7 @@ private static void visit(ClassNode classNode, Map values) { return newClinitMethod; }); List constructors = classNode.methods.stream().filter(method -> "".equals(method.name)) - .collect(Collectors.toList()); + .toList(); MethodNode initMethod = constructors.stream().filter(method -> method.invisibleAnnotations != null && method.invisibleAnnotations.stream().anyMatch(annotation -> INJECTED_CONSTRUCTOR_DESC.equals(annotation.desc))).findFirst() .orElseGet(() -> constructors.stream().filter(method -> method.desc.equals("()V")).findFirst().orElse(null)); @@ -112,7 +112,7 @@ public void visit(final String name, final Object value) { } List putStaticNodes = Arrays.stream(initMethod.instructions.toArray()) .filter(node -> node instanceof FieldInsnNode && node.getOpcode() == Opcodes.PUTSTATIC).map(p -> (FieldInsnNode) p) - .filter(node -> node.owner.equals(classNode.name) && node.name.equals(field.name) && node.desc.equals(field.desc)).collect(Collectors.toList()); + .filter(node -> node.owner.equals(classNode.name) && node.name.equals(field.name) && node.desc.equals(field.desc)).toList(); InsnList setter = serializeValue(value); if (putStaticNodes.isEmpty()) { setter.add(new FieldInsnNode(Opcodes.PUTSTATIC, classNode.name, field.name, field.desc)); @@ -130,7 +130,7 @@ public void visit(final String name, final Object value) { } List putFieldNodes = Arrays.stream(initMethod.instructions.toArray()) .filter(node -> node instanceof FieldInsnNode && node.getOpcode() == Opcodes.PUTFIELD).map(p -> (FieldInsnNode) p) - .filter(node -> node.owner.equals(classNode.name) && node.name.equals(field.name) && node.desc.equals(field.desc)).collect(Collectors.toList()); + .filter(node -> node.owner.equals(classNode.name) && node.name.equals(field.name) && node.desc.equals(field.desc)).toList(); InsnList setter = serializeValue(value); if (putFieldNodes.isEmpty()) { setter.insert(new VarInsnNode(Opcodes.ALOAD, 0)); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthException.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthException.java index 83e81014..0fb5c766 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthException.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthException.java @@ -3,10 +3,12 @@ import pro.gravit.launcher.events.request.AuthRequestEvent; import java.io.IOException; +import java.io.Serial; import java.util.List; import java.util.stream.Collectors; public final class AuthException extends IOException { + @Serial private static final long serialVersionUID = -2586107832847245863L; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java index 4ee003eb..ec5c287f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/AuthProviderPair.java @@ -4,8 +4,6 @@ import org.apache.logging.log4j.Logger; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.auth.core.AuthCoreProvider; -import pro.gravit.launchserver.auth.core.MySQLCoreProvider; -import pro.gravit.launchserver.auth.core.PostgresSQLCoreProvider; import pro.gravit.launchserver.auth.texture.TextureProvider; import java.io.IOException; @@ -23,7 +21,6 @@ public final class AuthProviderPair { public transient Set features; public String displayName; public boolean visible = true; - private transient boolean warnOAuthShow = false; public AuthProviderPair() { } @@ -56,15 +53,6 @@ public static void getFeatures(Class clazz, Set list) { } } - public void internalShowOAuthWarnMessage() { - if (!warnOAuthShow) { - if (!(core instanceof MySQLCoreProvider) && !(core instanceof PostgresSQLCoreProvider)) { // MySQL and PostgreSQL upgraded later - logger.warn("AuthCoreProvider {} ({}) not supported OAuth. Legacy session system may be removed in next release", name, core.getClass().getName()); - } - warnOAuthShow = true; - } - } - public final T isSupport(Class clazz) { if (core == null) return null; T result = null; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java index a389f631..1336c331 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java @@ -29,7 +29,7 @@ import java.util.UUID; public abstract class AbstractSQLCoreProvider extends AuthCoreProvider { - public transient Logger logger = LogManager.getLogger(); + public final transient Logger logger = LogManager.getLogger(); public int expireSeconds = 3600; public String uuidColumn; public String usernameColumn; @@ -208,7 +208,7 @@ protected String makeUserCols() { return String.format("%s, %s, %s, %s, %s", uuidColumn, usernameColumn, accessTokenColumn, serverIDColumn, passwordColumn); } - protected boolean updateAuth(User user, String accessToken) throws IOException { + protected void updateAuth(User user, String accessToken) throws IOException { try (Connection c = getSQLConfig().getConnection()) { SQLUser SQLUser = (SQLUser) user; SQLUser.accessToken = accessToken; @@ -216,7 +216,7 @@ protected boolean updateAuth(User user, String accessToken) throws IOException { s.setString(1, accessToken); s.setString(2, user.getUUID().toString()); s.setQueryTimeout(MySQLSourceConfig.TIMEOUT); - return s.executeUpdate() > 0; + s.executeUpdate(); } catch (SQLException e) { throw new IOException(e); } @@ -238,7 +238,7 @@ protected boolean updateServerID(User user, String serverID) throws IOException } @Override - public void close() throws IOException { + public void close() { getSQLConfig().close(); } @@ -299,12 +299,12 @@ private List queryRolesNames(String sql, String value) throws SQLExcepti } public static class SQLUser implements User { - protected UUID uuid; - protected String username; + protected final UUID uuid; + protected final String username; protected String accessToken; protected String serverId; - protected String password; - protected ClientPermissions permissions; + protected final String password; + protected final ClientPermissions permissions; public SQLUser(UUID uuid, String username, String accessToken, String serverId, String password, ClientPermissions permissions) { this.uuid = uuid; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java index cb8860cb..a6c210b0 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AuthCoreProvider.java @@ -140,7 +140,7 @@ public void invoke(String... args) throws Exception { if (instance != null) { map.put("getallusers", new SubCommand("(limit)", "print all users information") { @Override - public void invoke(String... args) throws Exception { + public void invoke(String... args) { int max = Integer.MAX_VALUE; if (args.length > 0) max = Integer.parseInt(args[0]); Iterable users = instance.getAllUsers(); @@ -316,7 +316,7 @@ public T isSupport(Class clazz) { } @Override - public abstract void close() throws IOException; + public abstract void close(); public static class PasswordVerifyReport { public static final PasswordVerifyReport REQUIRED_2FA = new PasswordVerifyReport(-1); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/HttpAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/HttpAuthCoreProvider.java index e929144d..ffb9bfb8 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/HttpAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/HttpAuthCoreProvider.java @@ -1,6 +1,5 @@ package pro.gravit.launchserver.auth.core; -import com.google.gson.reflect.TypeToken; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import pro.gravit.launcher.ClientPermissions; @@ -318,7 +317,7 @@ public void init(LaunchServer server) { } @Override - public void close() throws IOException { + public void close() { } @@ -525,10 +524,6 @@ public class HttpUser implements User, UserSupportTextures, UserSupportPropertie private String serverId; private String accessToken; private ClientPermissions permissions; - @Deprecated - private Texture skin; - @Deprecated - private Texture cloak; private Map assets; private Map properties; private long hwidId; @@ -552,8 +547,6 @@ public HttpUser(String username, UUID uuid, String serverId, String accessToken, this.serverId = serverId; this.accessToken = accessToken; this.permissions = permissions; - this.skin = skin; - this.cloak = cloak; this.hwidId = hwidId; } @@ -563,8 +556,6 @@ public HttpUser(String username, UUID uuid, String serverId, String accessToken, this.serverId = serverId; this.accessToken = accessToken; this.permissions = permissions; - this.skin = skin; - this.cloak = cloak; this.properties = properties; this.hwidId = hwidId; } @@ -607,30 +598,17 @@ public ClientPermissions getPermissions() { @Override public Texture getSkinTexture() { - if (assets == null) { - return skin; - } return assets.get("SKIN"); } @Override public Texture getCloakTexture() { - if (assets == null) { - return cloak; - } return assets.get("CAPE"); } public Map getAssets() { if (assets == null) { - Map map = new HashMap<>(); - if (skin != null) { - map.put("SKIN", skin); - } - if (cloak != null) { - map.put("CAPE", cloak); - } - return map; + return new HashMap<>(); } return assets; } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java index f572dce5..62c3391c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MemoryAuthCoreProvider.java @@ -53,7 +53,7 @@ public User getUserByUUID(UUID uuid) { } @Override - public UserSession getUserSessionByOAuthAccessToken(String accessToken) throws OAuthAccessTokenExpired { + public UserSession getUserSessionByOAuthAccessToken(String accessToken) { synchronized (memory) { for (MemoryUser u : memory) { if (u.accessToken.equals(accessToken)) { @@ -95,14 +95,14 @@ public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext c } @Override - protected boolean updateServerID(User user, String serverID) throws IOException { + protected boolean updateServerID(User user, String serverID) { MemoryUser memoryUser = (MemoryUser) user; memoryUser.serverId = serverID; return true; } @Override - public User checkServer(Client client, String username, String serverID) throws IOException { + public User checkServer(Client client, String username, String serverID) { synchronized (memory) { for (MemoryUser u : memory) { if (u.username.equals(username)) { @@ -116,7 +116,7 @@ public User checkServer(Client client, String username, String serverID) throws } @Override - public boolean joinServer(Client client, String username, String accessToken, String serverID) throws IOException { + public boolean joinServer(Client client, String username, String accessToken, String serverID) { return true; } @@ -126,16 +126,16 @@ public void init(LaunchServer server) { } @Override - public void close() throws IOException { + public void close() { } public static class MemoryUser implements User { - private String username; - private UUID uuid; + private final String username; + private final UUID uuid; private String serverId; - private String accessToken; - private ClientPermissions permissions; + private final String accessToken; + private final ClientPermissions permissions; public MemoryUser(String username) { this.username = username; @@ -188,9 +188,9 @@ public int hashCode() { } public static class MemoryUserSession implements UserSession { - private String id; - private MemoryUser user; - private long expireIn; + private final String id; + private final MemoryUser user; + private final long expireIn; public MemoryUserSession(MemoryUser user) { this.id = SecurityHelper.randomStringToken(); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java index 74498515..1989b942 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/MergeAuthCoreProvider.java @@ -17,7 +17,7 @@ public class MergeAuthCoreProvider extends AuthCoreProvider { private transient final Logger logger = LogManager.getLogger(MergeAuthCoreProvider.class); public List list = new ArrayList<>(); - private transient List providers = new ArrayList<>(); + private final transient List providers = new ArrayList<>(); @Override public User getUserByUsername(String username) { for(var core : providers) { @@ -67,7 +67,7 @@ public User checkServer(Client client, String username, String serverID) throws } @Override - public boolean joinServer(Client client, String username, String accessToken, String serverID) throws IOException { + public boolean joinServer(Client client, String username, String accessToken, String serverID) { return false; // Authorization not supported } @@ -84,7 +84,7 @@ public void init(LaunchServer server) { } @Override - public void close() throws IOException { + public void close() { // Providers closed automatically } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java index 6db40500..69697c7e 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/RejectAuthCoreProvider.java @@ -21,7 +21,7 @@ public User getUserByUUID(UUID uuid) { } @Override - public UserSession getUserSessionByOAuthAccessToken(String accessToken) throws OAuthAccessTokenExpired { + public UserSession getUserSessionByOAuthAccessToken(String accessToken) { return null; } @@ -46,12 +46,12 @@ public void init(LaunchServer server) { } @Override - protected boolean updateServerID(User user, String serverID) throws IOException { + protected boolean updateServerID(User user, String serverID) { return false; } @Override - public void close() throws IOException { + public void close() { } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportExit.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportExit.java index 4cd58a05..f48aaf1a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportExit.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/interfaces/provider/AuthSupportExit.java @@ -4,7 +4,7 @@ import pro.gravit.launchserver.auth.core.UserSession; public interface AuthSupportExit extends AuthSupport { - boolean deleteSession(UserSession session); + void deleteSession(UserSession session); - boolean exitUser(User user); + void exitUser(User user); } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/password/JsonPasswordVerifier.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/password/JsonPasswordVerifier.java index 339b8447..e43ae2a8 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/password/JsonPasswordVerifier.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/password/JsonPasswordVerifier.java @@ -14,7 +14,7 @@ import java.time.Duration; public class JsonPasswordVerifier extends PasswordVerifier { - private static transient final Logger logger = LogManager.getLogger(); + private static final Logger logger = LogManager.getLogger(); private transient final HttpClient client = HttpClient.newBuilder().build(); public String url; public String bearerToken; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java index 6b0c7529..d740b7a3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/AdvancedProtectHandler.java @@ -15,7 +15,6 @@ import pro.gravit.launchserver.auth.protect.interfaces.JoinServerProtectHandler; import pro.gravit.launchserver.auth.protect.interfaces.SecureProtectHandler; import pro.gravit.launchserver.socket.Client; -import pro.gravit.launchserver.socket.response.auth.AuthResponse; import pro.gravit.launchserver.socket.response.auth.RestoreResponse; import pro.gravit.launchserver.socket.response.secure.HardwareReportResponse; @@ -27,16 +26,6 @@ public class AdvancedProtectHandler extends StdProtectHandler implements SecureP public boolean enableHardwareFeature; private transient LaunchServer server; - @Override - public boolean allowGetAccessToken(AuthResponse.AuthContext context) { - return (context.authType == AuthResponse.ConnectTypes.CLIENT) && context.client.checkSign; - } - - @Override - public void checkLaunchServerLicense() { - - } - @Override public GetSecureLevelInfoRequestEvent onGetSecureLevelInfo(GetSecureLevelInfoRequestEvent event) { return event; @@ -73,11 +62,9 @@ public void onHardwareReport(HardwareReportResponse response, Client client) { } client.trustLevel.hardwareInfo = hardware.getHardwareInfo(); response.sendResult(new HardwareReportRequestEvent(createHardwareToken(client.username, hardware))); - return; } else { logger.error("AuthCoreProvider not supported hardware"); response.sendError("AuthCoreProvider not supported hardware"); - return; } } } @@ -113,10 +100,6 @@ public void init(LaunchServer server) { this.server = server; } - @Override - public void close() { - } - public String createHardwareToken(String username, UserHardware hardware) { return Jwts.builder() .setIssuer("LaunchServer") @@ -138,12 +121,10 @@ public String createPublicKeyToken(String username, byte[] publicKey) { } public static class HardwareInfoTokenVerifier implements RestoreResponse.ExtendedTokenProvider { - private transient final LaunchServer server; private transient final Logger logger = LogManager.getLogger(); private final JwtParser parser; public HardwareInfoTokenVerifier(LaunchServer server) { - this.server = server; this.parser = Jwts.parserBuilder() .requireIssuer("LaunchServer") .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) @@ -172,12 +153,10 @@ public boolean accept(Client client, AuthProviderPair pair, String extendedToken } public static class PublicKeyTokenVerifier implements RestoreResponse.ExtendedTokenProvider { - private transient final LaunchServer server; private transient final Logger logger = LogManager.getLogger(); private final JwtParser parser; public PublicKeyTokenVerifier(LaunchServer server) { - this.server = server; this.parser = Jwts.parserBuilder() .requireIssuer("LaunchServer") .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/NoProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/NoProtectHandler.java index cd80b54b..2cacc3bf 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/NoProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/NoProtectHandler.java @@ -9,8 +9,4 @@ public boolean allowGetAccessToken(AuthResponse.AuthContext context) { return true; } - @Override - public void checkLaunchServerLicense() { - // None - } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/ProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/ProtectHandler.java index bead3fd2..ab3edf69 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/ProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/ProtectHandler.java @@ -20,8 +20,6 @@ public static void registerHandlers() { public abstract boolean allowGetAccessToken(AuthResponse.AuthContext context); - public abstract void checkLaunchServerLicense(); //Выдает SecurityException при ошибке проверки лицензии - public void init(LaunchServer server) { } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java index dd307ddb..008e4dea 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/protect/StdProtectHandler.java @@ -20,11 +20,6 @@ public boolean allowGetAccessToken(AuthResponse.AuthContext context) { return (context.authType == AuthResponse.ConnectTypes.CLIENT) && context.client.checkSign; } - @Override - public void checkLaunchServerLicense() { - - } - @Override public void init(LaunchServer server) { if (profileWhitelist != null && profileWhitelist.size() > 0) { @@ -59,7 +54,6 @@ private boolean isWhitelisted(String property, ClientProfile profile, Client cli } } List allowedUsername = profileWhitelist.get(profile.getTitle()); - if (allowedUsername != null && allowedUsername.contains(client.username)) return true; - return false; + return allowedUsername != null && allowedUsername.contains(client.username); } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/JsonTextureProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/JsonTextureProvider.java index 2653a51e..ca27671b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/JsonTextureProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/texture/JsonTextureProvider.java @@ -15,24 +15,24 @@ import java.util.UUID; public class JsonTextureProvider extends TextureProvider { - private transient static final Type MAP_TYPE = new TypeToken>() { + private static final Type MAP_TYPE = new TypeToken>() { }.getType(); private transient final Logger logger = LogManager.getLogger(); public String url; @Override - public void close() throws IOException { + public void close() { //None } @Override - public Texture getCloakTexture(UUID uuid, String username, String client) throws IOException { + public Texture getCloakTexture(UUID uuid, String username, String client) { logger.warn("Ineffective get cloak texture for {}", username); return getAssets(uuid, username, client).get("CAPE"); } @Override - public Texture getSkinTexture(UUID uuid, String username, String client) throws IOException { + public Texture getSkinTexture(UUID uuid, String username, String client) { logger.warn("Ineffective get skin texture for {}", username); return getAssets(uuid, username, client).get("SKIN"); } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/AttachJarsTask.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/AttachJarsTask.java index 998cd516..4904283d 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/AttachJarsTask.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/AttachJarsTask.java @@ -4,12 +4,9 @@ import pro.gravit.utils.helper.IOHelper; import java.io.IOException; -import java.io.InputStream; import java.nio.file.Path; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/SignJarTask.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/SignJarTask.java index a2c09d8c..517adc48 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/SignJarTask.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/SignJarTask.java @@ -26,7 +26,7 @@ public class SignJarTask implements LauncherBuildTask { - private transient static final Logger logger = LogManager.getLogger(); + private static final Logger logger = LogManager.getLogger(); private final LaunchServerConfig.JarSignerConf config; private final LaunchServer srv; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/DebugCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/DebugCommand.java index 03a7858c..355f1463 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/DebugCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/basic/DebugCommand.java @@ -10,7 +10,7 @@ import pro.gravit.launchserver.command.Command; public class DebugCommand extends Command { - private transient Logger logger = LogManager.getLogger(); + private final transient Logger logger = LogManager.getLogger(); public DebugCommand(LaunchServer server) { super(server); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java index 300b4916..1f3e41ac 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/handler/CommandHandler.java @@ -12,7 +12,6 @@ import pro.gravit.utils.command.basic.HelpCommand; public abstract class CommandHandler extends pro.gravit.utils.command.CommandHandler { - @SuppressWarnings("deprecation") public static void registerCommands(pro.gravit.utils.command.CommandHandler handler, LaunchServer server) { BaseCommandCategory basic = new BaseCommandCategory(); // Register basic commands diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java index 30db46a8..114a054b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SecurityCheckCommand.java @@ -30,7 +30,7 @@ import java.util.stream.Collectors; public class SecurityCheckCommand extends Command { - private static transient final Logger logger = LogManager.getLogger(); + private static final Logger logger = LogManager.getLogger(); public SecurityCheckCommand(LaunchServer server) { super(server); @@ -110,7 +110,7 @@ public void invoke(String... args) { try { KeyStore keyStore = SignHelper.getStore(new File(config.sign.keyStore).toPath(), config.sign.keyStorePass, config.sign.keyStoreType); Certificate[] certChainPlain = keyStore.getCertificateChain(config.sign.keyAlias); - List certChain = Arrays.stream(certChainPlain).map(e -> (X509Certificate) e).collect(Collectors.toList()); + List certChain = Arrays.stream(certChainPlain).map(e -> (X509Certificate) e).toList(); X509Certificate cert = certChain.get(0); cert.checkValidity(); if (certChain.size() <= 1) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SignJarCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SignJarCommand.java index deef6036..ecdfdf7f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SignJarCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/SignJarCommand.java @@ -41,7 +41,7 @@ public void invoke(String... args) throws Exception { Optional task = server.launcherBinary.getTaskByClass(SignJarTask.class); if (task.isEmpty()) throw new IllegalStateException("SignJarTask not found"); task.get().sign(server.config.sign, target, tmpSign); - if (args.length <= 1) { + if (args.length == 1) { logger.info("Move temp jar {} to {}", tmpSign.toString(), target.toString()); Files.deleteIfExists(target); Files.move(tmpSign, target); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java index 4e27f048..f6090469 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/command/service/TokenCommand.java @@ -25,7 +25,7 @@ public void invoke(String... args) throws Exception { }); this.childCommands.put("server", new SubCommand("[profileName] (authId)", "generate new server token") { @Override - public void invoke(String... args) throws Exception { + public void invoke(String... args) { AuthProviderPair pair = args.length > 1 ? server.config.getAuthProviderPair(args[1]) : server.config.getAuthProviderPair(); ClientProfile profile = null; for (ClientProfile p : server.getProfiles()) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java index 8951e72e..55c36f06 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/components/ProGuardComponent.java @@ -28,7 +28,7 @@ import java.util.Map; public class ProGuardComponent extends Component implements AutoCloseable, Reconfigurable { - private transient static final Logger logger = LogManager.getLogger(); + private static final Logger logger = LogManager.getLogger(); public String modeAfter = "MainBuild"; public String dir = "proguard"; public boolean enabled = true; @@ -79,7 +79,7 @@ public void init(LaunchServer launchServer) { } @Override - public void close() throws Exception { + public void close() { if (launchServer != null && buildTask != null) { launchServer.launcherBinary.tasks.remove(buildTask); } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/components/WhitelistComponent.java b/LaunchServer/src/main/java/pro/gravit/launchserver/components/WhitelistComponent.java index 20d69a21..6699a9af 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/components/WhitelistComponent.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/components/WhitelistComponent.java @@ -48,7 +48,7 @@ public boolean hookJoin(JoinServerResponse response, Client client) throws HookE } @Override - public void close() throws Exception { + public void close() { this.server.authHookManager.preHook.unregisterHook(this::hookAuth); this.server.authHookManager.joinServerHook.unregisterHook(this::hookJoin); } @@ -82,14 +82,14 @@ public void invoke(String... args) throws Exception { }); commands.put("disable", new SubCommand() { @Override - public void invoke(String... args) throws Exception { + public void invoke(String... args) { enabled = false; logger.info("Whitelist disabled"); } }); commands.put("enable", new SubCommand() { @Override - public void invoke(String... args) throws Exception { + public void invoke(String... args) { enabled = true; logger.info("Whitelist enabled"); } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index af766e3c..ee810bd0 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -106,9 +106,8 @@ public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) { return newConfig; } - public LaunchServerConfig setLaunchServer(LaunchServer server) { + public void setLaunchServer(LaunchServer server) { this.server = server; - return this; } public AuthProviderPair getAuthProviderPair(String name) { @@ -187,7 +186,6 @@ public void init(LaunchServer.ReloadType type) { if (protectHandler != null) { server.registerObject("protectHandler", protectHandler); protectHandler.init(server); - protectHandler.checkLaunchServerLicense(); } if (components != null) { components.forEach((k, v) -> server.registerObject("component.".concat(k), v)); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/HttpHelper.java b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/HttpHelper.java index 1dc1acc1..6824adbe 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/helper/HttpHelper.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/helper/HttpHelper.java @@ -22,7 +22,7 @@ import java.util.function.Function; public final class HttpHelper { - private static transient final Logger logger = LogManager.getLogger(); + private static final Logger logger = LogManager.getLogger(); private HttpHelper() { throw new UnsupportedOperationException(); @@ -37,7 +37,7 @@ public static HttpOptional send(HttpClient client, HttpRequest requ } } - public static CompletableFuture> sendAsync(HttpClient client, HttpRequest request, HttpErrorHandler handler) throws IOException { + public static CompletableFuture> sendAsync(HttpClient client, HttpRequest request, HttpErrorHandler handler) { return client.sendAsync(request, HttpResponse.BodyHandlers.ofInputStream()).thenApply(handler::apply); } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/FeaturesManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/FeaturesManager.java index bb750340..5802dfa4 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/FeaturesManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/FeaturesManager.java @@ -7,11 +7,9 @@ import java.util.Map; public class FeaturesManager { - private final transient LaunchServer server; private final Map map; public FeaturesManager(LaunchServer server) { - this.server = server; map = new HashMap<>(); addFeatureInfo("version", Version.getVersion().getVersionString()); addFeatureInfo("projectName", server.config.projectName); @@ -25,8 +23,8 @@ public String getFeatureInfo(String name) { return map.get(name); } - public String addFeatureInfo(String name, String featureInfo) { - return map.put(name, featureInfo); + public void addFeatureInfo(String name, String featureInfo) { + map.put(name, featureInfo); } public String removeFeatureInfo(String name) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/KeyAgreementManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/KeyAgreementManager.java index 0ee48ecd..4ddee0cc 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/KeyAgreementManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/KeyAgreementManager.java @@ -22,7 +22,6 @@ public class KeyAgreementManager { public final RSAPublicKey rsaPublicKey; public final RSAPrivateKey rsaPrivateKey; public final String legacySalt; - private transient final Logger logger = LogManager.getLogger(); public KeyAgreementManager(ECPublicKey ecdsaPublicKey, ECPrivateKey ecdsaPrivateKey, RSAPublicKey rsaPublicKey, RSAPrivateKey rsaPrivateKey, String legacySalt) { this.ecdsaPublicKey = ecdsaPublicKey; @@ -34,6 +33,7 @@ public KeyAgreementManager(ECPublicKey ecdsaPublicKey, ECPrivateKey ecdsaPrivate public KeyAgreementManager(Path keyDirectory) throws IOException, InvalidKeySpecException { Path ecdsaPublicKeyPath = keyDirectory.resolve("ecdsa_id.pub"), ecdsaPrivateKeyPath = keyDirectory.resolve("ecdsa_id"); + Logger logger = LogManager.getLogger(); if (IOHelper.isFile(ecdsaPublicKeyPath) && IOHelper.isFile(ecdsaPrivateKeyPath)) { logger.info("Reading ECDSA keypair"); ecdsaPublicKey = SecurityHelper.toPublicECDSAKey(IOHelper.read(ecdsaPublicKeyPath)); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/LauncherNettyServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/LauncherNettyServer.java index 024951cd..592a79d3 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/LauncherNettyServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/LauncherNettyServer.java @@ -1,7 +1,6 @@ package pro.gravit.launchserver.socket; import io.netty.bootstrap.ServerBootstrap; -import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelPipeline; import io.netty.channel.EventLoopGroup; @@ -34,11 +33,11 @@ public class LauncherNettyServer implements AutoCloseable { public final EventLoopGroup workerGroup; public final WebSocketService service; public final BiHookSet pipelineHook = new BiHookSet<>(); - private transient final Logger logger = LogManager.getLogger(); public LauncherNettyServer(LaunchServer server) { LaunchServerConfig.NettyConfig config = server.config.netty; NettyObjectFactory.setUsingEpoll(config.performance.usingEpoll); + Logger logger = LogManager.getLogger(); if (config.performance.usingEpoll) { logger.debug("Netty: Epoll enabled"); } @@ -74,8 +73,8 @@ public void initChannel(SocketChannel ch) { }); } - public ChannelFuture bind(InetSocketAddress address) { - return serverBootstrap.bind(address); + public void bind(InetSocketAddress address) { + serverBootstrap.bind(address); } @Override diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java index 555bb696..2cd59b24 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java @@ -56,7 +56,6 @@ public WebSocketService(ChannelGroup channels, LaunchServer server) { this.gson = Launcher.gsonManager.gson; } - @SuppressWarnings("deprecation") public static void registerResponses() { providers.register("auth", AuthResponse.class); providers.register("checkServer", CheckServerResponse.class); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java index b9603131..46fa2fd4 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyWebAPIHandler.java @@ -36,10 +36,9 @@ public NettyWebAPIHandler(NettyConnectContext context) { this.context = context; } - public static SeverletPathPair addNewSeverlet(String path, SimpleSeverletHandler callback) { + public static void addNewSeverlet(String path, SimpleSeverletHandler callback) { SeverletPathPair pair = new SeverletPathPair("/webapi/".concat(path), callback); severletList.add(pair); - return pair; } public static SeverletPathPair addUnsafeSeverlet(String path, SimpleSeverletHandler callback) { @@ -53,7 +52,7 @@ public static void removeSeverlet(SeverletPathPair pair) { } @Override - protected void channelRead0(ChannelHandlerContext ctx, FullHttpRequest msg) throws Exception { + protected void channelRead0(ChannelHandlerContext ctx, FullHttpRequest msg) { boolean isNext = true; for (SeverletPathPair pair : severletList) { if (msg.uri().startsWith(pair.key)) { @@ -75,7 +74,7 @@ protected void channelRead0(ChannelHandlerContext ctx, FullHttpRequest msg) thro @FunctionalInterface public interface SimpleSeverletHandler { - void handle(ChannelHandlerContext ctx, FullHttpRequest msg, NettyConnectContext context) throws Exception; + void handle(ChannelHandlerContext ctx, FullHttpRequest msg, NettyConnectContext context); default Map getParamsFromUri(String uri) { int ind = uri.indexOf("?"); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AdditionalDataResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AdditionalDataResponse.java index 7b99818b..b3a38e6b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AdditionalDataResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AdditionalDataResponse.java @@ -11,7 +11,6 @@ import java.util.Map; import java.util.UUID; -@SuppressWarnings("deprecation") public class AdditionalDataResponse extends SimpleResponse { public String username; public UUID uuid; @@ -22,7 +21,7 @@ public String getType() { } @Override - public void execute(ChannelHandlerContext ctx, Client client) throws Exception { + public void execute(ChannelHandlerContext ctx, Client client) { if (!client.isAuth) { sendError("Access denied"); return; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java index e947bfaf..58f1ea35 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java @@ -28,7 +28,7 @@ public String getType() { } @Override - public void execute(ChannelHandlerContext ctx, Client clientData) throws Exception { + public void execute(ChannelHandlerContext ctx, Client clientData) { try { AuthRequestEvent result = new AuthRequestEvent(); AuthProviderPair pair; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CurrentUserResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CurrentUserResponse.java index 8cfd8455..d1aaa064 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CurrentUserResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/CurrentUserResponse.java @@ -6,11 +6,9 @@ import pro.gravit.launchserver.socket.Client; import pro.gravit.launchserver.socket.response.SimpleResponse; -import java.io.IOException; - public class CurrentUserResponse extends SimpleResponse { - public static CurrentUserRequestEvent.UserInfo collectUserInfoFromClient(LaunchServer server, Client client) throws IOException { + public static CurrentUserRequestEvent.UserInfo collectUserInfoFromClient(LaunchServer server, Client client) { CurrentUserRequestEvent.UserInfo result = new CurrentUserRequestEvent.UserInfo(); if (client.auth != null && client.isAuth && client.username != null) { result.playerProfile = server.authManager.getPlayerProfile(client); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/FetchClientProfileKeyResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/FetchClientProfileKeyResponse.java index 2e1281d9..92f191f5 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/FetchClientProfileKeyResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/FetchClientProfileKeyResponse.java @@ -14,7 +14,7 @@ public String getType() { } @Override - public void execute(ChannelHandlerContext ctx, Client client) throws Exception { + public void execute(ChannelHandlerContext ctx, Client client) { if (!client.isAuth || client.type != AuthResponse.ConnectTypes.CLIENT) { sendError("Permissions denied"); return; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RefreshTokenResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RefreshTokenResponse.java index f6dfada4..892a4e3c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RefreshTokenResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RefreshTokenResponse.java @@ -18,7 +18,7 @@ public String getType() { } @Override - public void execute(ChannelHandlerContext ctx, Client client) throws Exception { + public void execute(ChannelHandlerContext ctx, Client client) { if (refreshToken == null) { sendError("Invalid request"); return; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java index e7a51b3c..fa720e5c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreResponse.java @@ -76,6 +76,10 @@ public void execute(ChannelHandlerContext ctx, Client client) throws Exception { return; } User user = session.getUser(); + if(user == null) { + sendError("Internal Auth error: UserSession is broken"); + return; + } client.coreObject = user; client.sessionObject = session; server.authManager.internalAuth(client, client.type == null ? AuthResponse.ConnectTypes.API : client.type, pair, user.getUsername(), user.getUUID(), user.getPermissions(), true); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreSessionResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreSessionResponse.java index ca314187..e28955df 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreSessionResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/RestoreSessionResponse.java @@ -18,7 +18,7 @@ public String getType() { } @Override - public void execute(ChannelHandlerContext ctx, Client client) throws Exception { + public void execute(ChannelHandlerContext ctx, Client client) { sendError("Legacy session system removed"); } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetPublicKeyResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetPublicKeyResponse.java index daebed27..398dc3e4 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetPublicKeyResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/management/GetPublicKeyResponse.java @@ -12,7 +12,7 @@ public String getType() { } @Override - public void execute(ChannelHandlerContext ctx, Client client) throws Exception { + public void execute(ChannelHandlerContext ctx, Client client) { sendResult(new GetPublicKeyRequestEvent(server.keyAgreementManager.rsaPublicKey, server.keyAgreementManager.ecdsaPublicKey)); } } diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/BatchProfileByUsername.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/BatchProfileByUsername.java index 513a7ff6..3193d940 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/BatchProfileByUsername.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/BatchProfileByUsername.java @@ -16,7 +16,7 @@ public String getType() { } @Override - public void execute(ChannelHandlerContext ctx, Client client) throws Exception { + public void execute(ChannelHandlerContext ctx, Client client) { BatchProfileByUsernameRequestEvent result = new BatchProfileByUsernameRequestEvent(); if (list == null) { sendError("Invalid request"); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java index 50ec6978..90f59088 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUUIDResponse.java @@ -19,7 +19,7 @@ public String getType() { } @Override - public void execute(ChannelHandlerContext ctx, Client client) throws Exception { + public void execute(ChannelHandlerContext ctx, Client client) { AuthProviderPair pair; if (client.auth == null) { pair = server.config.getAuthProviderPair(); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUsername.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUsername.java index 08ecb794..d19c301a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUsername.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/profile/ProfileByUsername.java @@ -17,7 +17,7 @@ public String getType() { } @Override - public void execute(ChannelHandlerContext ctx, Client client) throws Exception { + public void execute(ChannelHandlerContext ctx, Client client) { AuthProviderPair pair = client.auth; if (pair == null) pair = server.config.getAuthProviderPair(); PlayerProfile profile = server.authManager.getPlayerProfile(pair, username); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java index f011283c..31274399 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java @@ -85,12 +85,10 @@ private boolean checkSecure(String hash, String salt) { } public static class LauncherTokenVerifier implements RestoreResponse.ExtendedTokenProvider { - private final LaunchServer server; private final JwtParser parser; private final Logger logger = LogManager.getLogger(); public LauncherTokenVerifier(LaunchServer server) { - this.server = server; parser = Jwts.parserBuilder() .setSigningKey(server.keyAgreementManager.ecdsaPublicKey) .requireIssuer("LaunchServer") diff --git a/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java b/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java index dce01ae2..112fbc13 100644 --- a/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java +++ b/LaunchServer/src/test/java/pro/gravit/launchserver/ASMTransformersTest.java @@ -21,7 +21,7 @@ public class ASMTransformersTest { public static ASMClassLoader classLoader; @BeforeAll - public static void prepare() throws Throwable { + public static void prepare() { classLoader = new ASMClassLoader(ASMTransformersTest.class.getClassLoader()); } diff --git a/LaunchServer/src/test/java/pro/gravit/launchserver/ConfigurationTest.java b/LaunchServer/src/test/java/pro/gravit/launchserver/ConfigurationTest.java index ba8976e7..89ce58eb 100644 --- a/LaunchServer/src/test/java/pro/gravit/launchserver/ConfigurationTest.java +++ b/LaunchServer/src/test/java/pro/gravit/launchserver/ConfigurationTest.java @@ -2,6 +2,7 @@ import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import pro.gravit.launcher.Launcher; import pro.gravit.launchserver.config.LaunchServerConfig; @@ -45,4 +46,9 @@ public static void prepare() throws Throwable { .setCommandHandler(new StdCommandHandler(false)); launchServer = builder.build(); } + + @Test + public void test() { + + } } diff --git a/LaunchServer/src/test/java/pro/gravit/launchserver/impl/TestLaunchServerConfigManager.java b/LaunchServer/src/test/java/pro/gravit/launchserver/impl/TestLaunchServerConfigManager.java index 67ff77e5..2d56691d 100644 --- a/LaunchServer/src/test/java/pro/gravit/launchserver/impl/TestLaunchServerConfigManager.java +++ b/LaunchServer/src/test/java/pro/gravit/launchserver/impl/TestLaunchServerConfigManager.java @@ -4,8 +4,6 @@ import pro.gravit.launchserver.config.LaunchServerConfig; import pro.gravit.launchserver.config.LaunchServerRuntimeConfig; -import java.io.IOException; - public class TestLaunchServerConfigManager implements LaunchServer.LaunchServerConfigManager { public LaunchServerConfig config; public LaunchServerRuntimeConfig runtimeConfig; @@ -17,22 +15,22 @@ public TestLaunchServerConfigManager() { } @Override - public LaunchServerConfig readConfig() throws IOException { + public LaunchServerConfig readConfig() { return config; } @Override - public LaunchServerRuntimeConfig readRuntimeConfig() throws IOException { + public LaunchServerRuntimeConfig readRuntimeConfig() { return runtimeConfig; } @Override - public void writeConfig(LaunchServerConfig config) throws IOException { + public void writeConfig(LaunchServerConfig config) { } @Override - public void writeRuntimeConfig(LaunchServerRuntimeConfig config) throws IOException { + public void writeRuntimeConfig(LaunchServerRuntimeConfig config) { } } diff --git a/Launcher/build.gradle b/Launcher/build.gradle index c492bd5c..02cdfb7e 100644 --- a/Launcher/build.gradle +++ b/Launcher/build.gradle @@ -29,12 +29,12 @@ "Multi-Release": "true") } -task sourcesJar(type: Jar) { +tasks.register('sourcesJar', Jar) { from sourceSets.main.allJava archiveClassifier.set('sources') } -task javadocJar(type: Jar) { +tasks.register('javadocJar', Jar) { from javadoc archiveClassifier.set('javadoc') } @@ -53,14 +53,14 @@ pack project(':LauncherAPI') pack group: 'io.netty', name: 'netty-codec-http', version: rootProject['verNetty'] } -task genRuntimeJS(type: Zip) { +tasks.register('genRuntimeJS', Zip) { duplicatesStrategy = 'EXCLUDE' archiveFileName = "runtime.zip" destinationDirectory = file("${buildDir}/tmp") from "runtime/" } -task dumpLibs(type: Copy) { +tasks.register('dumpLibs', Copy) { duplicatesStrategy = 'EXCLUDE' into "$buildDir/libs/libraries" from configurations.bundle diff --git a/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java b/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java index 5b487024..6a0d2f29 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java +++ b/Launcher/src/main/java/pro/gravit/launcher/ClientLauncherWrapper.java @@ -83,8 +83,6 @@ public static void main(String[] arguments) throws IOException, InterruptedExcep } context.executePath = IOHelper.resolveJavaBin(context.javaVersion.jvmDir); - //List args = new LinkedList<>(); - //args.add(javaBin.toString()); String pathLauncher = IOHelper.getCodeSource(LauncherEngine.class).toString(); context.mainClass = LauncherEngine.class.getName(); context.memoryLimit = launcherMemoryLimit; diff --git a/Launcher/src/main/java/pro/gravit/launcher/LauncherEngine.java b/Launcher/src/main/java/pro/gravit/launcher/LauncherEngine.java index 6f22d4f9..74ad4797 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/LauncherEngine.java +++ b/Launcher/src/main/java/pro/gravit/launcher/LauncherEngine.java @@ -130,8 +130,6 @@ public static void main(String... args) throws Throwable { } long endTime = System.currentTimeMillis(); LogHelper.debug("Launcher started in %dms", endTime - startTime); - //Request.service.close(); - //FunctionalBridge.close(); LauncherEngine.exitLauncher(0); } diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/ClientClassLoader.java b/Launcher/src/main/java/pro/gravit/launcher/client/ClientClassLoader.java index 192e0741..82e7a38b 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/ClientClassLoader.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/ClientClassLoader.java @@ -12,7 +12,7 @@ public class ClientClassLoader extends URLClassLoader { private static final ClassLoader SYSTEM_CLASS_LOADER = ClassLoader.getSystemClassLoader(); public String nativePath; - private List packages = new ArrayList<>(); + private final List packages = new ArrayList<>(); /** * Constructs a new URLClassLoader for the specified URLs using the @@ -32,7 +32,6 @@ public class ClientClassLoader extends URLClassLoader { * {@code checkCreateClassLoader} method doesn't allow * creation of a class loader. * @throws NullPointerException if {@code urls} is {@code null}. - * @see SecurityManager#checkCreateClassLoader */ public ClientClassLoader(URL[] urls) { super(urls); @@ -59,7 +58,6 @@ public ClientClassLoader(URL[] urls) { * {@code checkCreateClassLoader} method doesn't allow * creation of a class loader. * @throws NullPointerException if {@code urls} is {@code null}. - * @see SecurityManager#checkCreateClassLoader */ public ClientClassLoader(URL[] urls, ClassLoader parent) { super(urls, parent); diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherProcess.java b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherProcess.java index 8a9343f6..94abd9e2 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherProcess.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherProcess.java @@ -186,20 +186,10 @@ public void start(boolean pipeOutput) throws IOException, InterruptedException { } private void applyJava9Params(List processArgs) { - /*jvmModulesPaths.add(javaVersion.jvmDir); - jvmModulesPaths.add(javaVersion.jvmDir.resolve("jre")); - Path openjfxPath = JavaHelper.tryGetOpenJFXPath(javaVersion.jvmDir); - if (openjfxPath != null) { - jvmModulesPaths.add(openjfxPath); - }*/ // TODO: fix runtime in client + // TODO: fix runtime in client StringBuilder modulesPath = new StringBuilder(); StringBuilder modulesAdd = new StringBuilder(); for (String moduleName : jvmModules) { - /*boolean success = JavaHelper.tryAddModule(jvmModulesPaths, moduleName, modulesPath); - if (success) { - if (modulesAdd.length() > 0) modulesAdd.append(","); - modulesAdd.append(moduleName); - }*/ if (modulesAdd.length() > 0) modulesAdd.append(","); modulesAdd.append(moduleName); } diff --git a/Launcher/src/main/java/pro/gravit/launcher/console/GetPublicKeyCommand.java b/Launcher/src/main/java/pro/gravit/launcher/console/GetPublicKeyCommand.java index 49a64eae..e20313fc 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/console/GetPublicKeyCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/console/GetPublicKeyCommand.java @@ -24,7 +24,7 @@ public String getUsageDescription() { } @Override - public void invoke(String... args) throws Exception { + public void invoke(String... args) { LogHelper.info("PublicKey: %s", Base64.getEncoder().encodeToString(engine.getClientPublicKey().getEncoded())); } } diff --git a/Launcher/src/main/java/pro/gravit/launcher/console/ModulesCommand.java b/Launcher/src/main/java/pro/gravit/launcher/console/ModulesCommand.java index 69206700..94b03799 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/console/ModulesCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/console/ModulesCommand.java @@ -23,7 +23,7 @@ public String getUsageDescription() { } @Override - public void invoke(String... args) throws Exception { + public void invoke(String... args) { for (LauncherModule module : LauncherEngine.modulesManager.getModules()) { LauncherModuleInfo info = module.getModuleInfo(); LauncherTrustManager.CheckClassResult checkStatus = module.getCheckResult(); diff --git a/Launcher/src/main/java/pro/gravit/launcher/console/test/PrintHardwareInfoCommand.java b/Launcher/src/main/java/pro/gravit/launcher/console/test/PrintHardwareInfoCommand.java index 5c3c42a7..93bbe490 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/console/test/PrintHardwareInfoCommand.java +++ b/Launcher/src/main/java/pro/gravit/launcher/console/test/PrintHardwareInfoCommand.java @@ -16,7 +16,7 @@ public String getUsageDescription() { } @Override - public void invoke(String... args) throws Exception { + public void invoke(String... args) { LogHelper.info("Your Hardware ID:"); long startTime = System.currentTimeMillis(); long currentTime; diff --git a/Launcher/src/main/java/pro/gravit/launcher/gui/NoRuntimeProvider.java b/Launcher/src/main/java/pro/gravit/launcher/gui/NoRuntimeProvider.java index 9f3b6af8..0ac704d9 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/gui/NoRuntimeProvider.java +++ b/Launcher/src/main/java/pro/gravit/launcher/gui/NoRuntimeProvider.java @@ -4,12 +4,12 @@ public class NoRuntimeProvider implements RuntimeProvider { @Override - public void run(String[] args) throws Exception { + public void run(String[] args) { JOptionPane.showMessageDialog(null, "GUI часть лаунчера не найдена.\nС 5.1.0 вам необходимо самостоятельно установить модуль, отвечающий за GUI. Рантайм на JS более не поддерживается"); } @Override - public void preLoad() throws Exception { + public void preLoad() { } diff --git a/Launcher/src/main/java/pro/gravit/launcher/gui/RuntimeProvider.java b/Launcher/src/main/java/pro/gravit/launcher/gui/RuntimeProvider.java index 398b0886..bee04f48 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/gui/RuntimeProvider.java +++ b/Launcher/src/main/java/pro/gravit/launcher/gui/RuntimeProvider.java @@ -1,9 +1,9 @@ package pro.gravit.launcher.gui; public interface RuntimeProvider { - void run(String[] args) throws Exception; + void run(String[] args); - void preLoad() throws Exception; + void preLoad(); void init(boolean clientInstance); } diff --git a/Launcher/src/main/java/pro/gravit/launcher/utils/DirWatcher.java b/Launcher/src/main/java/pro/gravit/launcher/utils/DirWatcher.java index 512d0bb1..84107d9b 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/utils/DirWatcher.java +++ b/Launcher/src/main/java/pro/gravit/launcher/utils/DirWatcher.java @@ -115,10 +115,6 @@ private final class RegisterFileVisitor extends SimpleFileVisitor { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException { FileVisitResult result = super.preVisitDirectory(dir, attrs); - if (DirWatcher.this.dir.equals(dir)) { - dir.register(service, KINDS); - return result; - } // Maybe it's unnecessary to go deeper //if (matcher != null && !matcher.shouldVerify(path)) { diff --git a/Launcher/src/main/java/pro/gravit/launcher/utils/NativeJVMHalt.java b/Launcher/src/main/java/pro/gravit/launcher/utils/NativeJVMHalt.java index 3d79d20c..34eea24c 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/utils/NativeJVMHalt.java +++ b/Launcher/src/main/java/pro/gravit/launcher/utils/NativeJVMHalt.java @@ -17,7 +17,6 @@ public static void initFunc() { } public static void haltA(int code) { - Throwable[] th = new Throwable[3]; NativeJVMHalt halt = new NativeJVMHalt(code); try { LogHelper.dev("Try invoke Shutdown.exit"); @@ -26,7 +25,6 @@ public static void haltA(int code) { exitMethod.setAccessible(true); exitMethod.invoke(null, code); } catch (Throwable e) { - th[1] = e; if (LogHelper.isDevEnabled()) { LogHelper.error(e); } diff --git a/LauncherAPI/build.gradle b/LauncherAPI/build.gradle index 13feac0d..8a418fc6 100644 --- a/LauncherAPI/build.gradle +++ b/LauncherAPI/build.gradle @@ -37,12 +37,12 @@ java11Implementation files(sourceSets.main.output.classesDirs) { builtBy compile targetCompatibility = 11 } -task sourcesJar(type: Jar) { +tasks.register('sourcesJar', Jar) { from sourceSets.main.allJava archiveClassifier.set('sources') } -task javadocJar(type: Jar) { +tasks.register('javadocJar', Jar) { from javadoc archiveClassifier.set('javadoc') } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java index 20e6b883..65ed59a4 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/modules/LauncherModule.java @@ -31,9 +31,8 @@ public InitStatus getInitStatus() { return initStatus; } - public LauncherModule setInitStatus(InitStatus initStatus) { + public void setInitStatus(InitStatus initStatus) { this.initStatus = initStatus; - return this; } /** @@ -71,11 +70,10 @@ public final void setCheckResult(LauncherTrustManager.CheckClassResult result) { this.checkResult = result; } - protected final LauncherModule requireModule(String name, Version minVersion) { + protected final void requireModule(String name, Version minVersion) { if (context == null) throw new IllegalStateException("requireModule must be used in init() phase"); LauncherModule module = context.getModulesManager().getModule(name); requireModule(module, minVersion, name); - return module; } protected final T requireModule(Class clazz, Version minVersion) { @@ -107,13 +105,12 @@ public void preInitAction() { //NOP } - public final LauncherModule preInit() { + public final void preInit() { if (!initStatus.equals(InitStatus.PRE_INIT_WAIT)) throw new IllegalStateException("PreInit not allowed in current state"); initStatus = InitStatus.PRE_INIT; preInitAction(); initStatus = InitStatus.INIT_WAIT; - return this; } /** @@ -225,9 +222,8 @@ public boolean isCancel() { return cancel; } - public Event cancel() { + public void cancel() { this.cancel = true; - return this; } } } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java index c4a1342e..3773e1c2 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java @@ -8,7 +8,6 @@ import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.VerifyHelper; -import java.io.IOException; import java.net.InetSocketAddress; import java.util.*; @@ -510,7 +509,7 @@ public enum CompatibilityFlags { @FunctionalInterface public interface pushOptionalClassPathCallback { - void run(String[] opt) throws IOException; + void run(String[] opt); } public static class ServerProfile { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileBuilder.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileBuilder.java index fe83469e..78ebfae7 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileBuilder.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileBuilder.java @@ -35,9 +35,8 @@ public class ClientProfileBuilder { private String info; private String mainClass; - public ClientProfileBuilder setUpdate(List update) { + public void setUpdate(List update) { this.update = update; - return this; } public ClientProfileBuilder setUpdateExclusions(List updateExclusions) { @@ -50,34 +49,28 @@ public ClientProfileBuilder setUpdateShared(List updateShared) { return this; } - public ClientProfileBuilder setUpdateVerify(List updateVerify) { + public void setUpdateVerify(List updateVerify) { this.updateVerify = updateVerify; - return this; } - public ClientProfileBuilder setUpdateOptional(Set updateOptional) { + public void setUpdateOptional(Set updateOptional) { this.updateOptional = updateOptional; - return this; } - public ClientProfileBuilder setJvmArgs(List jvmArgs) { + public void setJvmArgs(List jvmArgs) { this.jvmArgs = jvmArgs; - return this; } - public ClientProfileBuilder setClassPath(List classPath) { + public void setClassPath(List classPath) { this.classPath = classPath; - return this; } - public ClientProfileBuilder setAltClassPath(List altClassPath) { + public void setAltClassPath(List altClassPath) { this.altClassPath = altClassPath; - return this; } - public ClientProfileBuilder setClientArgs(List clientArgs) { + public void setClientArgs(List clientArgs) { this.clientArgs = clientArgs; - return this; } public ClientProfileBuilder setCompatClasses(List compatClasses) { @@ -90,39 +83,32 @@ public ClientProfileBuilder setProperties(Map properties) { return this; } - public ClientProfileBuilder setServers(List servers) { + public void setServers(List servers) { this.servers = servers; - return this; } - public ClientProfileBuilder setClassLoaderConfig(ClientProfile.ClassLoaderConfig classLoaderConfig) { + public void setClassLoaderConfig(ClientProfile.ClassLoaderConfig classLoaderConfig) { this.classLoaderConfig = classLoaderConfig; - return this; } - public ClientProfileBuilder setVersion(String version) { + public void setVersion(String version) { this.version = version; - return this; } - public ClientProfileBuilder setAssetIndex(String assetIndex) { + public void setAssetIndex(String assetIndex) { this.assetIndex = assetIndex; - return this; } - public ClientProfileBuilder setDir(String dir) { + public void setDir(String dir) { this.dir = dir; - return this; } - public ClientProfileBuilder setAssetDir(String assetDir) { + public void setAssetDir(String assetDir) { this.assetDir = assetDir; - return this; } - public ClientProfileBuilder setRecommendJavaVersion(int recommendJavaVersion) { + public void setRecommendJavaVersion(int recommendJavaVersion) { this.recommendJavaVersion = recommendJavaVersion; - return this; } public ClientProfileBuilder setModulePath(List modulePath) { @@ -135,14 +121,12 @@ public ClientProfileBuilder setModules(List modules) { return this; } - public ClientProfileBuilder setMinJavaVersion(int minJavaVersion) { + public void setMinJavaVersion(int minJavaVersion) { this.minJavaVersion = minJavaVersion; - return this; } - public ClientProfileBuilder setMaxJavaVersion(int maxJavaVersion) { + public void setMaxJavaVersion(int maxJavaVersion) { this.maxJavaVersion = maxJavaVersion; - return this; } public ClientProfileBuilder setSettings(ClientProfile.ProfileDefaultSettings settings) { @@ -155,24 +139,20 @@ public ClientProfileBuilder setSortIndex(int sortIndex) { return this; } - public ClientProfileBuilder setUuid(UUID uuid) { + public void setUuid(UUID uuid) { this.uuid = uuid; - return this; } - public ClientProfileBuilder setTitle(String title) { + public void setTitle(String title) { this.title = title; - return this; } - public ClientProfileBuilder setInfo(String info) { + public void setInfo(String info) { this.info = info; - return this; } - public ClientProfileBuilder setMainClass(String mainClass) { + public void setMainClass(String mainClass) { this.mainClass = mainClass; - return this; } public ClientProfileBuilder setFlags(List flags) { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/JavaTrigger.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/JavaTrigger.java index d7ffad83..46c08852 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/JavaTrigger.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/triggers/JavaTrigger.java @@ -31,7 +31,6 @@ public boolean isTriggered(OptionalFile optional, OptionalTriggerContext context JavaHelper.JavaVersion version = context.getJavaVersion(); if (version.version < minVersion) return false; if (version.version > maxVersion) return false; - if (requireJavaFX && !version.enabledJavaFX) return false; - return true; + return !requireJavaFX || version.enabledJavaFX; } } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java index b3d4df69..0c6f1cc5 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/Request.java @@ -116,9 +116,9 @@ public static String getRefreshToken() { return oauth == null ? null : oauth.refreshToken; } - public static RequestRestoreReport reconnect() throws Exception { + public static void reconnect() throws Exception { service.open(); - return restore(); + restore(); } public static RequestRestoreReport restore() throws Exception { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/RequestService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/RequestService.java index 39cc2f27..2f8d4bab 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/RequestService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/RequestService.java @@ -29,7 +29,7 @@ default T requestSync(Request request) throws IOEx boolean isClosed(); @FunctionalInterface - public interface EventHandler { + interface EventHandler { /** * @param event processing event * @param event type diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java index d4ce4ec0..255c3267 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientJSONPoint.java @@ -126,9 +126,9 @@ public void openAsync(Runnable onConnect, Consumer onFail) { }); } - public ChannelFuture send(String text) { + public void send(String text) { LogHelper.dev("Send: %s", text); - return ch.writeAndFlush(new TextWebSocketFrame(text), ch.voidPromise()); + ch.writeAndFlush(new TextWebSocketFrame(text), ch.voidPromise()); } abstract void onMessage(String message); diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java index 9da094b4..04062458 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/ClientWebSocketService.java @@ -114,33 +114,17 @@ public void registerResults() { } public void waitIfNotConnected() { - /*if(!isOpen() && !isClosed() && !isClosing()) - { - LogHelper.warning("WebSocket not connected. Try wait onConnect object"); - synchronized (onConnect) - { - try { - onConnect.wait(5000); - } catch (InterruptedException e) { - LogHelper.error(e); - } - } - }*/ } public void sendObject(Object obj) throws IOException { waitIfNotConnected(); if (ch == null || !ch.isActive()) reconnectCallback.onReconnect(); - //if(isClosed() && reconnectCallback != null) - // reconnectCallback.onReconnect(); send(gson.toJson(obj, WebSocketRequest.class)); } public void sendObject(Object obj, Type type) throws IOException { waitIfNotConnected(); if (ch == null || !ch.isActive()) reconnectCallback.onReconnect(); - //if(isClosed() && reconnectCallback != null) - // reconnectCallback.onReconnect(); send(gson.toJson(obj, type)); } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/OfflineRequestService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/OfflineRequestService.java index 09aee311..bb86a8c2 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/OfflineRequestService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/OfflineRequestService.java @@ -7,7 +7,6 @@ import pro.gravit.launcher.request.WebSocketEvent; import pro.gravit.utils.helper.LogHelper; -import java.io.IOException; import java.util.HashSet; import java.util.Map; import java.util.concurrent.CompletableFuture; @@ -19,7 +18,7 @@ public class OfflineRequestService implements RequestService { @Override @SuppressWarnings("unchecked") - public CompletableFuture request(Request request) throws IOException { + public CompletableFuture request(Request request) { RequestProcessor> processor = (RequestProcessor>) processors.get(request.getClass()); CompletableFuture future = new CompletableFuture<>(); if (processor == null) { diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StdWebSocketService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StdWebSocketService.java index ad6212e1..26515464 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StdWebSocketService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StdWebSocketService.java @@ -27,7 +27,7 @@ public StdWebSocketService(String address) throws SSLException { super(address); } - public static CompletableFuture initWebSockets(String address) throws Exception { + public static CompletableFuture initWebSockets(String address) { StdWebSocketService service; try { service = new StdWebSocketService(address); @@ -41,16 +41,12 @@ public static CompletableFuture initWebSockets(String addre future.complete(service); JVMHelper.RUNTIME.addShutdownHook(new Thread(() -> { try { - //if(service.isOpen()) - // service.closeBlocking(); service.close(); } catch (InterruptedException e) { LogHelper.error(e); } })); - }, (error) -> { - future.completeExceptionally(error); - }); + }, (error) -> future.completeExceptionally(error)); return future; } @@ -74,7 +70,7 @@ public void processEventHandlers(T event) { } } - @SuppressWarnings({"unchecked", "deprecation"}) + @SuppressWarnings({"unchecked"}) public void eventHandle(T webSocketEvent) { if (webSocketEvent instanceof RequestEvent) { RequestEvent event = (RequestEvent) webSocketEvent; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/VoidRequestService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/VoidRequestService.java index e08214c2..b45c5dc5 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/VoidRequestService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/VoidRequestService.java @@ -5,7 +5,6 @@ import pro.gravit.launcher.request.RequestService; import pro.gravit.launcher.request.WebSocketEvent; -import java.io.IOException; import java.util.concurrent.CompletableFuture; public class VoidRequestService implements RequestService { @@ -20,7 +19,7 @@ public VoidRequestService() { } @Override - public CompletableFuture request(Request request) throws IOException { + public CompletableFuture request(Request request) { CompletableFuture future = new CompletableFuture<>(); future.completeExceptionally(ex != null ? ex : new RequestException("Connection fail")); return future; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java index 58cd35be..1fa99c11 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/WebSocketClientHandler.java @@ -29,14 +29,14 @@ public void handlerAdded(final ChannelHandlerContext ctx) { } @Override - public void channelActive(final ChannelHandlerContext ctx) throws Exception { + public void channelActive(final ChannelHandlerContext ctx) { handshaker.handshake(ctx.channel()); clientJSONPoint.onOpen(); ctx.executor().scheduleWithFixedDelay(() -> ctx.channel().writeAndFlush(new PingWebSocketFrame()), 20L, 20L, TimeUnit.SECONDS); } @Override - public void channelInactive(final ChannelHandlerContext ctx) throws Exception { + public void channelInactive(final ChannelHandlerContext ctx) { //System.out.println("WebSocket Client disconnected!"); clientJSONPoint.onDisconnect(); } diff --git a/LauncherCore/build.gradle b/LauncherCore/build.gradle index 9fd20aed..e8401182 100644 --- a/LauncherCore/build.gradle +++ b/LauncherCore/build.gradle @@ -43,12 +43,12 @@ java11Implementation files(sourceSets.main.output.classesDirs) { builtBy compile targetCompatibility = 11 } -task sourcesJar(type: Jar) { +tasks.register('sourcesJar', Jar) { from sourceSets.main.allJava archiveClassifier.set('sources') } -task javadocJar(type: Jar) { +tasks.register('javadocJar', Jar) { from javadoc archiveClassifier.set('javadoc') } diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/AsyncDownloader.java b/LauncherCore/src/main/java/pro/gravit/launcher/AsyncDownloader.java index f7ff77fa..2c495419 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/AsyncDownloader.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/AsyncDownloader.java @@ -101,7 +101,7 @@ public void downloadListInOneThread(List files, String baseURL, Path } } - public void downloadListInOneThreadSimple(List files, String baseURL, Path targetDir) throws URISyntaxException, IOException { + public void downloadListInOneThreadSimple(List files, String baseURL, Path targetDir) throws IOException { for (AsyncDownloader.SizedFile currentFile : files) { downloadFile(new URL(baseURL + currentFile.urlPath), targetDir.resolve(currentFile.filePath), currentFile.size); @@ -157,7 +157,7 @@ public CompletableFuture[] runDownloadListSimple(List> files, St futures[i] = CompletableFuture.runAsync(() -> { try { downloadListInOneThreadSimple(currentTasks, baseURL, targetDir); - } catch (URISyntaxException | IOException e) { + } catch (IOException e) { throw new CompletionException(e); } }, executor); diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedDir.java b/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedDir.java index 71b28e17..38128287 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedDir.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/hasher/HashedDir.java @@ -288,7 +288,7 @@ public enum WalkAction { @FunctionalInterface public interface WalkCallback { - WalkAction walked(String path, String name, HashedEntry entry) throws IOException; + WalkAction walked(String path, String name, HashedEntry entry); } public static class FindRecursiveResult { diff --git a/LauncherCore/src/main/java/pro/gravit/utils/BiHookSet.java b/LauncherCore/src/main/java/pro/gravit/utils/BiHookSet.java index fd3bf7a4..408934d0 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/BiHookSet.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/BiHookSet.java @@ -10,8 +10,8 @@ public void registerHook(Hook hook) { list.add(hook); } - public boolean unregisterHook(Hook hook) { - return list.remove(hook); + public void unregisterHook(Hook hook) { + list.remove(hook); } /** diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Downloader.java b/LauncherCore/src/main/java/pro/gravit/utils/Downloader.java index b36da07f..39cec8f0 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Downloader.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Downloader.java @@ -17,7 +17,7 @@ private Downloader(CompletableFuture future, AsyncDownloader downloader) { this.asyncDownloader = downloader; } - public static Downloader downloadList(List files, String baseURL, Path targetDir, DownloadCallback callback, ExecutorService executor, int threads) throws Exception { + public static Downloader downloadList(List files, String baseURL, Path targetDir, DownloadCallback callback, ExecutorService executor, int threads) { final boolean closeExecutor; LogHelper.info("Download with legacy mode"); if (executor == null) { diff --git a/LauncherCore/src/main/java/pro/gravit/utils/HookSet.java b/LauncherCore/src/main/java/pro/gravit/utils/HookSet.java index b60df1eb..7b8eb36f 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/HookSet.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/HookSet.java @@ -10,8 +10,8 @@ public void registerHook(Hook hook) { list.add(hook); } - public boolean unregisterHook(Hook hook) { - return list.remove(hook); + public void unregisterHook(Hook hook) { + list.remove(hook); } /** diff --git a/LauncherCore/src/main/java/pro/gravit/utils/PublicURLClassLoader.java b/LauncherCore/src/main/java/pro/gravit/utils/PublicURLClassLoader.java index c5082afc..90b73309 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/PublicURLClassLoader.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/PublicURLClassLoader.java @@ -23,7 +23,6 @@ public class PublicURLClassLoader extends URLClassLoader { * {@code checkCreateClassLoader} method doesn't allow * creation of a class loader. * @throws NullPointerException if {@code urls} is {@code null}. - * @see SecurityManager#checkCreateClassLoader */ public PublicURLClassLoader(URL[] urls) { super(urls); @@ -48,7 +47,6 @@ public PublicURLClassLoader(URL[] urls) { * {@code checkCreateClassLoader} method doesn't allow * creation of a class loader. * @throws NullPointerException if {@code urls} is {@code null}. - * @see SecurityManager#checkCreateClassLoader */ public PublicURLClassLoader(URL[] urls, ClassLoader parent) { super(urls, parent); diff --git a/LauncherCore/src/main/java/pro/gravit/utils/command/CommandHandler.java b/LauncherCore/src/main/java/pro/gravit/utils/command/CommandHandler.java index 44b538d3..b72e4eec 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/command/CommandHandler.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/command/CommandHandler.java @@ -82,8 +82,8 @@ public void registerCategory(Category category) { categories.add(category); } - public boolean unregisterCategory(Category category) { - return categories.remove(category); + public void unregisterCategory(Category category) { + categories.remove(category); } public Category findCategory(String name) { diff --git a/LauncherCore/src/main/java/pro/gravit/utils/command/JLineCommandHandler.java b/LauncherCore/src/main/java/pro/gravit/utils/command/JLineCommandHandler.java index e8a48d0b..fc10052a 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/command/JLineCommandHandler.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/command/JLineCommandHandler.java @@ -9,18 +9,6 @@ import java.util.List; public class JLineCommandHandler extends CommandHandler { - /*private final class JLineOutput implements Output { - @Override - public void println(String message) { - try { - reader.println(ConsoleReader.RESET_LINE + message); - reader.drawLine(); - reader.flush(); - } catch (IOException ignored) { - // Ignored - } - } - }*/ private final Terminal terminal; private final LineReader reader; @@ -40,8 +28,6 @@ public JLineCommandHandler() throws IOException { //reader.setExpandEvents(false); // Replace writer - //LogHelper.removeStdOutput(); - //LogHelper.addOutput(new JLineOutput(), LogHelper.OutputTypes.JANSI); } @Override diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java index 2b1812a6..4151dc98 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/IOHelper.java @@ -384,7 +384,7 @@ public static BasicFileAttributes readAttributes(Path path) throws IOException { return Files.readAttributes(path, BasicFileAttributes.class, LINK_OPTIONS); } - public static BufferedImage readTexture(Object input, boolean cloak) throws IOException { + public static void readTexture(Object input, boolean cloak) throws IOException { ImageReader reader = ImageIO.getImageReadersByMIMEType("image/png").next(); try { reader.setInput(ImageIO.createImageInputStream(input), false, false); @@ -396,7 +396,7 @@ public static BufferedImage readTexture(Object input, boolean cloak) throws IOEx throw new IOException(String.format("Invalid texture bounds: %dx%d", width, height)); // Read image - return reader.read(0); + reader.read(0); } finally { reader.dispose(); } @@ -528,8 +528,8 @@ public static long transfer(InputStream input, OutputStream output) throws IOExc return transferred; } - public static long transfer(InputStream input, Path file) throws IOException { - return transfer(input, file, false); + public static void transfer(InputStream input, Path file) throws IOException { + transfer(input, file, false); } public static long transfer(InputStream input, Path file, boolean append) throws IOException { diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JarHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JarHelper.java index 51288723..1e516138 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JarHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JarHelper.java @@ -87,7 +87,7 @@ public static InputStream getClassBytesStream(Class clazz) throws IOException return getClassBytesStream(clazz, clazz.getClassLoader()); } - public static InputStream getClassBytesStream(Class clazz, ClassLoader classLoader) throws IOException { + public static InputStream getClassBytesStream(Class clazz, ClassLoader classLoader) { return classLoader.getResourceAsStream(getClassFile(clazz)); } @@ -107,7 +107,7 @@ public static byte[] getClassFromJar(String name, Path file) throws IOException @FunctionalInterface public interface ZipWalkCallback { - void process(ZipInputStream input, ZipEntry e) throws IOException; + void process(ZipInputStream input, ZipEntry e); } @FunctionalInterface diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java index a0467b27..8c52aa53 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java @@ -63,11 +63,7 @@ public synchronized static List findJava() { } List javaPaths = new ArrayList<>(4); List result = new ArrayList<>(4); - try { - tryAddJava(javaPaths, result, JavaVersion.getCurrentJavaVersion()); - } catch (IOException e) { - LogHelper.error(e); - } + tryAddJava(javaPaths, result, JavaVersion.getCurrentJavaVersion()); String[] path = System.getenv("PATH").split(JVMHelper.OS_TYPE == JVMHelper.OS.MUSTDIE ? ";" : ":"); for (String p : path) { try { @@ -121,25 +117,20 @@ private static JavaVersion tryFindJavaByPath(Path path) { return null; } - public static boolean tryAddJava(List javaPaths, List result, JavaVersion version) throws IOException { - if (version == null) return false; + public static void tryAddJava(List javaPaths, List result, JavaVersion version) { + if (version == null) return; String path = version.jvmDir.toAbsolutePath().toString(); - if (javaPaths.contains(path)) return false; + if (javaPaths.contains(path)) return; javaPaths.add(path); result.add(version); - return true; } public static void trySearchJava(List javaPaths, List result, Path path) throws IOException { if (path == null || !Files.isDirectory(path)) return; Files.list(path).filter(p -> Files.exists(p.resolve("bin").resolve(JVMHelper.OS_TYPE == JVMHelper.OS.MUSTDIE ? "java.exe" : "java"))).forEach(e -> { - try { - tryAddJava(javaPaths, result, JavaVersion.getByPath(e)); - if (Files.exists(e.resolve("jre"))) { - tryAddJava(javaPaths, result, JavaVersion.getByPath(e.resolve("jre"))); - } - } catch (IOException ioException) { - LogHelper.error(ioException); + tryAddJava(javaPaths, result, JavaVersion.getByPath(e)); + if (Files.exists(e.resolve("jre"))) { + tryAddJava(javaPaths, result, JavaVersion.getByPath(e.resolve("jre"))); } }); } @@ -233,7 +224,7 @@ private static boolean isCurrentJavaSupportJavaFX() { } } - public static JavaVersion getByPath(Path jvmDir) throws IOException { + public static JavaVersion getByPath(Path jvmDir) { { JavaVersion version = JavaHelper.tryFindJavaByPath(jvmDir); if (version != null) { @@ -241,18 +232,23 @@ public static JavaVersion getByPath(Path jvmDir) throws IOException { } } Path releaseFile = jvmDir.resolve("release"); - JavaVersionAndBuild versionAndBuild; + JavaVersionAndBuild versionAndBuild = null; JVMHelper.ARCH arch = JVMHelper.ARCH_TYPE; if (IOHelper.isFile(releaseFile)) { - Properties properties = new Properties(); - properties.load(IOHelper.newReader(releaseFile)); - versionAndBuild = getJavaVersion(properties.getProperty("JAVA_VERSION").replaceAll("\"", "")); try { - arch = JVMHelper.getArch(properties.getProperty("OS_ARCH").replaceAll("\"", "")); - } catch (Throwable ignored) { - arch = null; + Properties properties = new Properties(); + properties.load(IOHelper.newReader(releaseFile)); + versionAndBuild = getJavaVersion(properties.getProperty("JAVA_VERSION").replaceAll("\"", "")); + try { + arch = JVMHelper.getArch(properties.getProperty("OS_ARCH").replaceAll("\"", "")); + } catch (Throwable ignored) { + arch = null; + } + } catch (IOException ignored) { + } - } else { + } + if(versionAndBuild == null) { versionAndBuild = new JavaVersionAndBuild(isExistExtJavaLibrary(jvmDir, "rt") ? 8 : 9, 0); } JavaVersion resultJavaVersion = new JavaVersion(jvmDir, versionAndBuild.version, versionAndBuild.build, arch, false); diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java index c5f2580a..d63fa7f6 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/LogHelper.java @@ -25,7 +25,7 @@ public final class LogHelper { public static final String NO_JANSI_PROPERTY = "launcher.noJAnsi"; public static final String NO_SLF4J_PROPERTY = "launcher.noSlf4j"; private static final Set> EXCEPTIONS_CALLBACKS = Collections.newSetFromMap(new ConcurrentHashMap<>(2)); - private static LogHelperAppender impl; + private static final LogHelperAppender impl; static { boolean useSlf4j = false; diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/UnpackHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/UnpackHelper.java index 410e55e8..b967fb03 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/UnpackHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/UnpackHelper.java @@ -11,16 +11,15 @@ import java.util.zip.ZipInputStream; public final class UnpackHelper { - public static boolean unpack(URL resource, Path target) throws IOException { + public static void unpack(URL resource, Path target) throws IOException { if (IOHelper.isFile(target)) { - if (matches(target, resource)) return false; + if (matches(target, resource)) return; } Files.deleteIfExists(target); IOHelper.createParentDirs(target); try (InputStream in = IOHelper.newInput(resource)) { IOHelper.transfer(in, target); } - return true; } private static boolean matches(Path target, URL in) { @@ -48,10 +47,10 @@ public static boolean unpackZipNoCheck(URL resource, Path target) throws IOExcep return true; } - public static boolean unpackZipNoCheck(String resource, Path target) throws IOException { + public static void unpackZipNoCheck(String resource, Path target) throws IOException { try { if (Files.isDirectory(target)) - return false; + return; Files.deleteIfExists(target); Files.createDirectory(target); try (ZipInputStream input = IOHelper.newZipInput(IOHelper.getResourceURL(resource))) { @@ -62,9 +61,7 @@ public static boolean unpackZipNoCheck(String resource, Path target) throws IOEx IOHelper.transfer(input, target.resolve(IOHelper.toPath(entry.getName()))); } } - return true; } catch (NoSuchFileException e) { - return true; } } } diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/VerifyHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/VerifyHelper.java index e3c41b65..f43a313b 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/VerifyHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/VerifyHelper.java @@ -67,8 +67,8 @@ public static double verifyDouble(double d, DoublePredicate predicate, String er throw new IllegalArgumentException(error); } - public static String verifyIDName(String name) { - return verify(name, VerifyHelper::isValidIDName, String.format("Invalid name: '%s'", name)); + public static void verifyIDName(String name) { + verify(name, VerifyHelper::isValidIDName, String.format("Invalid name: '%s'", name)); } public static int verifyInt(int i, IntPredicate predicate, String error) { diff --git a/LauncherCore/src/main/java/pro/gravit/utils/logging/SimpleLogHelperImpl.java b/LauncherCore/src/main/java/pro/gravit/utils/logging/SimpleLogHelperImpl.java index c8569e1f..36071e0a 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/logging/SimpleLogHelperImpl.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/logging/SimpleLogHelperImpl.java @@ -31,7 +31,6 @@ public class SimpleLogHelperImpl implements LogHelperAppender { // Output settings private final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy.MM.dd HH:mm:ss", Locale.US); private final Set OUTPUTS = Collections.newSetFromMap(new ConcurrentHashMap<>(2)); - private final LogHelper.OutputEnity STD_OUTPUT; public SimpleLogHelperImpl() { // Use JAnsi if available @@ -50,7 +49,7 @@ public SimpleLogHelperImpl() { JANSI = jansi; // Add std writer - STD_OUTPUT = new LogHelper.OutputEnity(System.out::println, JANSI ? LogHelper.OutputTypes.JANSI : LogHelper.OutputTypes.PLAIN); + OutputEnity STD_OUTPUT = new OutputEnity(System.out::println, JANSI ? OutputTypes.JANSI : OutputTypes.PLAIN); addOutput(STD_OUTPUT); // Add file log writer diff --git a/LauncherCore/src/main/java11/pro/gravit/utils/Downloader.java b/LauncherCore/src/main/java11/pro/gravit/utils/Downloader.java index 71dc6c4e..daf1dc5e 100644 --- a/LauncherCore/src/main/java11/pro/gravit/utils/Downloader.java +++ b/LauncherCore/src/main/java11/pro/gravit/utils/Downloader.java @@ -14,7 +14,6 @@ import java.nio.file.Path; import java.nio.file.StandardOpenOption; import java.util.Collections; -import java.util.LinkedList; import java.util.List; import java.util.Queue; import java.util.concurrent.*; diff --git a/ServerWrapper/build.gradle b/ServerWrapper/build.gradle index b481f010..66520bef 100644 --- a/ServerWrapper/build.gradle +++ b/ServerWrapper/build.gradle @@ -47,12 +47,12 @@ java11Implementation files(sourceSets.main.output.classesDirs) { builtBy compile "Multi-Release": "true") } -task sourcesJar(type: Jar) { +tasks.register('sourcesJar', Jar) { from sourceSets.main.allJava archiveClassifier.set('sources') } -task javadocJar(type: Jar) { +tasks.register('javadocJar', Jar) { from javadoc archiveClassifier.set('javadoc') } diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java index fa77103e..0a44b85d 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -70,7 +70,7 @@ public void restore() throws Exception { Request.restore(); } - public ProfilesRequestEvent getProfiles() throws Exception { + public void getProfiles() throws Exception { ProfilesRequestEvent result = new ProfilesRequest().request(); for (ClientProfile p : result.profiles) { LogHelper.debug("Get profile: %s", p.getTitle()); @@ -90,10 +90,8 @@ public ProfilesRequestEvent getProfiles() throws Exception { if (profile == null) { LogHelper.warning("Not connected to ServerProfile. May be serverName incorrect?"); } - return result; } - @SuppressWarnings("ConfusingArgumentToVarargsMethod") public void run(String... args) throws Throwable { initGson(); AuthRequest.registerProviders(); diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java index 3cbd59c6..bb19fc5f 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapperGsonManager.java @@ -2,7 +2,6 @@ import com.google.gson.GsonBuilder; import pro.gravit.launcher.managers.GsonManager; -import pro.gravit.launcher.modules.events.PreGsonPhase; import pro.gravit.launcher.request.websockets.ClientWebSocketService; public class ServerWrapperGsonManager extends GsonManager { diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/DownloadContextModifier.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/DownloadContextModifier.java index 7ad939ed..45224f92 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/DownloadContextModifier.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/DownloadContextModifier.java @@ -7,7 +7,6 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; public class DownloadContextModifier implements LibrariesHashFileModifier { @Override diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java index c671b706..aa6fdbef 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/InstallAuthlib.java @@ -14,7 +14,7 @@ import java.util.zip.ZipOutputStream; public class InstallAuthlib { - private static Map modifierMap; + private static final Map modifierMap; static { modifierMap = new HashMap<>(); modifierMap.put("META-INF/libraries.list", new LibrariesLstModifier()); @@ -43,7 +43,7 @@ public void run(String... args) throws Exception { LogHelper.info("Search .jar files in %s", context.workdir.toAbsolutePath()); IOHelper.walk(context.workdir, new SimpleFileVisitor() { @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { if(file.getFileName().toString().endsWith(".jar")) { context.files.add(file); } diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/LibrariesLstModifier.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/LibrariesLstModifier.java index b65f375c..b21c532a 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/LibrariesLstModifier.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/authlib/LibrariesLstModifier.java @@ -2,13 +2,12 @@ import pro.gravit.utils.helper.SecurityHelper; -import java.io.IOException; import java.nio.charset.StandardCharsets; public class LibrariesLstModifier implements LibrariesHashFileModifier { @Override - public byte[] apply(byte[] data, InstallAuthlib.InstallAuthlibContext context) throws IOException { + public byte[] apply(byte[] data, InstallAuthlib.InstallAuthlibContext context) { String[] lines = new String(data).split("\n"); for(int i=0;iUTF-8 -=================================================================== ---- bootstrap/pom.xml (revision 4c84f37fd23dfd67e4fee5dfd7cb62d67791129f) -+++ bootstrap/pom.xml (revision ) -@@ -50,7 +50,8 @@ - - - -- net.md_5.bungee.Bootstrap -+ net.md_5.bungee.Bootstrap -+ Launcher.jar - ${describe} - ${maven.build.timestamp} - -Index: proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== ---- proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java (revision 4c84f37fd23dfd67e4fee5dfd7cb62d67791129f) -+++ proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java (revision ) -@@ -2,6 +2,7 @@ - - import com.google.common.base.Charsets; - import com.google.common.base.Preconditions; -+import com.google.common.util.concurrent.ThreadFactoryBuilder; - import com.google.gson.Gson; - import java.math.BigInteger; - import java.net.InetAddress; -@@ -10,9 +11,14 @@ - import java.security.MessageDigest; - import java.util.List; - import java.util.UUID; -+import java.util.concurrent.ExecutorService; -+import java.util.concurrent.Executors; - import java.util.concurrent.TimeUnit; - import java.util.logging.Level; - import javax.crypto.SecretKey; -+ -+import com.mojang.authlib.yggdrasil.CompatBridge; -+import com.mojang.authlib.yggdrasil.CompatProfile; - import lombok.Getter; - import lombok.RequiredArgsConstructor; - import net.md_5.bungee.BungeeCord; -@@ -103,6 +109,8 @@ - private boolean legacy; - @Getter - private String extraDataInHandshake = ""; -+ private ExecutorService loginExecutor = Executors.newCachedThreadPool(new ThreadFactoryBuilder(). -+ setNameFormat("Login Thread #%1$d").setDaemon(true).build()); - - @Override - public boolean shouldHandle(PacketWrapper packet) throws Exception -@@ -262,7 +270,7 @@ - this.handshake = handshake; - ch.setVersion( handshake.getProtocolVersion() ); - -- // Starting with FML 1.8, a "\0FML\0" token is appended to the handshake. This interferes -+ // Starting with FML 1.8, a "\0FML\0" token is appended to the handshake. This interferes - // with Bungee's IP forwarding, so we detect it, and remove it from the host string, for now. - // We know FML appends \00FML\00. However, we need to also consider that other systems might - // add their own data to the end of the string. So, we just take everything from the \0 character -@@ -403,37 +411,27 @@ - { - sha.update( bit ); - } -- String encodedHash = URLEncoder.encode( new BigInteger( sha.digest() ).toString( 16 ), "UTF-8" ); - -- String preventProxy = ( ( BungeeCord.getInstance().config.isPreventProxyConnections() ) ? "&ip=" + URLEncoder.encode( getAddress().getAddress().getHostAddress(), "UTF-8" ) : "" ); -- String authURL = "https://sessionserver.mojang.com/session/minecraft/hasJoined?username=" + encName + "&serverId=" + encodedHash + preventProxy; - -- Callback handler = new Callback() -- { -- @Override -- public void done(String result, Throwable error) -- { -- if ( error == null ) -- { -- LoginResult obj = BungeeCord.getInstance().gson.fromJson( result, LoginResult.class ); -- if ( obj != null && obj.getId() != null ) -- { -- loginProfile = obj; -- name = obj.getName(); -- uniqueId = Util.getUUID( obj.getId() ); -- finish(); -- return; -- } -- disconnect( bungee.getTranslation( "offline_mode_player" ) ); -- } else -- { -- disconnect( bungee.getTranslation( "mojang_fail" ) ); -- bungee.getLogger().log( Level.SEVERE, "Error authenticating " + getName() + " with minecraft.net", error ); -+ final String username = InitialHandler.this.getName(); -+ final String serverID = new BigInteger(sha.digest()).toString(16); -+ loginExecutor.submit(() -> { -+ try { -+ CompatProfile properties = CompatBridge.checkServer(username, serverID); -+ if(properties == null) { // Invalid username or serverID -+ disconnect("Bad Login (Serverside)"); -+ return; - } -- } -- }; - -- HttpClient.get( authURL, ch.getHandle().eventLoop(), handler ); -+ // Successful login -+ uniqueId = properties.uuid; -+ loginProfile = new LoginResult(properties); -+ finish(); -+ } catch(Exception e) { -+ disconnect("Authentication failed"); -+ bungee.getLogger().log(Level.SEVERE, "Error authenticating " + username + " with Launcher", e); -+ } -+ }); - } - - private void finish() -Index: bootstrap/src/main/java/net/md_5/bungee/Bootstrap.java -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== ---- bootstrap/src/main/java/net/md_5/bungee/Bootstrap.java (revision 4c84f37fd23dfd67e4fee5dfd7cb62d67791129f) -+++ bootstrap/src/main/java/net/md_5/bungee/Bootstrap.java (revision ) -@@ -5,9 +5,9 @@ - - public static void main(String[] args) throws Exception - { -- if ( Float.parseFloat( System.getProperty( "java.class.version" ) ) < 51.0 ) -+ if ( Float.parseFloat( System.getProperty( "java.class.version" ) ) < 52.0 ) - { -- System.err.println( "*** ERROR *** BungeeCord requires Java 7 or above to function! Please download and install it!" ); -+ System.err.println( "*** ERROR *** BungeeCord requires Java 8 or above to function! Please download and install it!" ); - System.out.println( "You can check your Java version with the command: java -version" ); - return; - } -Index: proxy/src/main/java/net/md_5/bungee/connection/LoginResult.java -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== ---- proxy/src/main/java/net/md_5/bungee/connection/LoginResult.java (revision 4c84f37fd23dfd67e4fee5dfd7cb62d67791129f) -+++ proxy/src/main/java/net/md_5/bungee/connection/LoginResult.java (revision ) -@@ -1,5 +1,6 @@ - package net.md_5.bungee.connection; - -+import com.mojang.authlib.yggdrasil.CompatProfile; - import lombok.AllArgsConstructor; - import lombok.Data; - -@@ -12,6 +13,25 @@ - private String name; - private Property[] properties; - -+ public LoginResult(CompatProfile profile) { -+ id = profile.uuidHash; -+ properties = new Property[profile.countProperties()]; -+ -+ int index = 0; -+ if (profile.skinURL != null) { -+ properties[index++] = new Property(CompatProfile.SKIN_URL_PROPERTY, profile.skinURL, ""); -+ } -+ if (profile.skinDigest != null) { -+ properties[index++] = new Property(CompatProfile.SKIN_DIGEST_PROPERTY, profile.skinDigest, ""); -+ } -+ if (profile.cloakURL != null) { -+ properties[index++] = new Property(CompatProfile.CLOAK_URL_PROPERTY, profile.cloakURL, ""); -+ } -+ if (profile.cloakDigest != null) { -+ properties[index++] = new Property(CompatProfile.CLOAK_DIGEST_PROPERTY, profile.cloakDigest, ""); -+ } -+ } -+ - @Data - @AllArgsConstructor - public static class Property -Index: pom.xml -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== ---- pom.xml (revision 4c84f37fd23dfd67e4fee5dfd7cb62d67791129f) -+++ pom.xml (revision ) -@@ -68,8 +68,8 @@ - - unknown - 4.1.17.Final -- 1.7 -- 1.7 -+ 1.8 -+ 1.8 - UTF-8 - - -@@ -97,6 +97,13 @@ - lombok - 1.16.16 - provided -+ -+ -+ launcher -+ clientside -+ 4+ -+ system -+ $HOME$/Launcher/Launcher/build/libs/Launcher.jar - - - diff --git a/compat/LaunchWrapper.patch b/compat/LaunchWrapper.patch deleted file mode 100644 index 81059396..00000000 --- a/compat/LaunchWrapper.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/main/java/net/minecraft/launchwrapper/LaunchClassLoader.java b/src/main/java/net/minecraft/launchwrapper/LaunchClassLoader.java -index f4e83af..d3a6d7f 100644 ---- a/src/main/java/net/minecraft/launchwrapper/LaunchClassLoader.java -+++ b/src/main/java/net/minecraft/launchwrapper/LaunchClassLoader.java -@@ -58,6 +58,12 @@ public class LaunchClassLoader extends URLClassLoader { - addClassLoaderExclusion("org.apache.logging."); - addClassLoaderExclusion("net.minecraft.launchwrapper."); - -+ // classloader launcher exclusions -+ addClassLoaderExclusion("pro.gravit.launcher."); -+ addClassLoaderExclusion("com.mojang."); -+ addClassLoaderExclusion("com.google.gson."); -+ addClassLoaderExclusion("org.json."); -+ - // transformer exclusions - addTransformerExclusion("javax."); - addTransformerExclusion("argo."); diff --git a/compat/auth/asframework.php b/compat/auth/asframework.php deleted file mode 100644 index db19fb5f..00000000 --- a/compat/auth/asframework.php +++ /dev/null @@ -1,50 +0,0 @@ -auth($args['login'],$args['pass']); - echo 'OK:'.$acc->login.''; - app::stop(); - } catch (AccountException $e) { - $msg = $e->getMessage(); - if ($msg == AccountException::AuthError) { - echo 'Login or password is incorrect'; - app::stop(); - } - if ($msg == AccountException::NoLoginError) { - echo 'This account is not allowed to sign in'; - app::stop(); - } - if ($msg == AccountException::FatalBanError) { - echo 'You are permanently banned'; - app::stop(); - } - } - } -} diff --git a/compat/auth/dle.php b/compat/auth/dle.php deleted file mode 100644 index bc4a7cec..00000000 --- a/compat/auth/dle.php +++ /dev/null @@ -1,83 +0,0 @@ - false, - - 'login' => filter_input(INPUT_GET, 'login', FILTER_SANITIZE_STRING), - 'password' => filter_input(INPUT_GET, 'password', FILTER_SANITIZE_STRING) - -]; - -if( isset( $auth['login'] ) AND isset( $auth['password'] ) ) { - - define( 'DATALIFEENGINE', true ); - require( __DIR__ . '/engine/classes/mysql.php' ); - require_once( __DIR__ . '/engine/data/dbconfig.php' ); - - $auth['login'] = $db->safesql( $auth['login'] ); - $auth['password'] = $db->safesql( $auth['password'] ); - - if( strlen($auth['password']) > 72 ) $auth['password'] = substr($auth['password'], 0, 72); - - $member_id = $db->super_query( "SELECT name, email, password, hash FROM dle_users WHERE name='{$auth['login']}' OR email='{$auth['login']}'" ); - - if( !$member_id['name'] AND !$member_id['email'] ) { - - exit('Введены неверные данные'); - } - - if( strlen($member_id['password']) == 32 && ctype_xdigit($member_id['password']) ) { - - if( $member_id['password'] == md5(md5($auth['password'])) ) { - $auth['logged'] = true; - } - - } else { - - if( password_verify($auth['password'], $member_id['password']) ) { - $auth['logged'] = true; - } - - } - - if( $auth['logged'] ) { - - session_regenerate_id(); - - if ( password_needs_rehash($member_id['password'], PASSWORD_DEFAULT) ) { - - $member_id['password'] = password_hash($auth['password'], PASSWORD_DEFAULT); - - $new_pass_hash = 'password='.$db->safesql($member_id['password']).', '; - - } else $new_pass_hash = ''; - - if( function_exists('openssl_random_pseudo_bytes') ) { - - $stronghash = md5(openssl_random_pseudo_bytes(15)); - - } else $stronghash = md5(uniqid( mt_rand(), TRUE )); - - $salt = sha1( str_shuffle('abcdefghjkmnpqrstuvwxyz0123456789') . $stronghash ); - $hash = ''; - - for($i = 0; $i < 9; $i ++) { - $hash .= $salt{mt_rand( 0, 39 )}; - } - - $hash = md5( $hash ); - $member_id['hash'] = $hash; - - $db->query( "UPDATE LOW_PRIORITY dle_users SET {$new_pass_hash}hash='{$hash}' WHERE name='{$member_id['name']}'" ); - - exit('OK:'.$member_id['name'].''); - - } else { - - exit('Ошибка при авторизации'); - } -} else { - exit('Введены неверные данные'); -} -?> diff --git a/compat/auth/dle.sql b/compat/auth/dle.sql deleted file mode 100644 index 633b2bc9..00000000 --- a/compat/auth/dle.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT name FROM dle_users WHERE (email=? OR name=?) AND password=MD5(MD5(?)) LIMIT 1 diff --git a/compat/auth/ipb.php b/compat/auth/ipb.php deleted file mode 100644 index 99ea456b..00000000 --- a/compat/auth/ipb.php +++ /dev/null @@ -1,28 +0,0 @@ -init(); - -// Resolve member by login -$member = IPSMember::load(IPSText::parseCleanValue($login), 'all', 'username'); -$member_id = $member['member_id']; -if (!$member_id) { - exit('Введены неверные данные'); -} - -// Try authenticate -$success = IPSMember::authenticateMember($member_id, md5(IPSText::parseCleanValue($password))); -echo($success ? 'OK:' . $member['name'] : 'Ошибка при авторизации'); -?> diff --git a/compat/auth/ips.php b/compat/auth/ips.php deleted file mode 100644 index b454f202..00000000 --- a/compat/auth/ips.php +++ /dev/null @@ -1,22 +0,0 @@ -member_id ) -{ - if ( strcmp( $member->members_pass_hash, $member->encryptedPassword( $_GET['password'] ) ) === 0 ) - { - echo 'OK:' . $member->name; - } - else - { - echo 'Incorrect login or password'; - } -} -else -{ - echo 'Incorrect login or password'; -} diff --git a/compat/auth/joomla.sql b/compat/auth/joomla.sql deleted file mode 100644 index 18feac41..00000000 --- a/compat/auth/joomla.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT username FROM joomla_users WHERE (email=? OR username=?) AND password=CONCAT_WS(':', MD5(CONCAT(?, SUBSTRING_INDEX(SUBSTRING_INDEX(password, ':', 2), ':', -1))), SUBSTRING_INDEX(SUBSTRING_INDEX(password, ':', 2), ':', -1)) LIMIT 1 diff --git a/compat/auth/laravel/authcontroller/LauncherAuthController.php b/compat/auth/laravel/authcontroller/LauncherAuthController.php deleted file mode 100644 index 6c41adc4..00000000 --- a/compat/auth/laravel/authcontroller/LauncherAuthController.php +++ /dev/null @@ -1,36 +0,0 @@ -getContent()); - - if ($data->apiKey !== env('LAUNCHER_APIKEY')) { - return response()->json([ - 'error' => 'Неверный ключ. Обратитесь к администратору', - ]); - } - - if (Auth::attempt(['name' => $data->username, 'password' => $data->password])) { - $perm = DB::table('users') - ->select('launcher_permission') - ->where('name', '=', $data->username) - ->first(); - - return response()->json([ - 'username' => $data->username, - 'permission' => $perm->launcher_permission, - ]); - } else { - return response()->json([ - 'error' => 'Неверный логин или пароль', - ]); - } - } -} diff --git a/compat/auth/laravel/authcontroller/README.MD b/compat/auth/laravel/authcontroller/README.MD deleted file mode 100644 index b6c0a203..00000000 --- a/compat/auth/laravel/authcontroller/README.MD +++ /dev/null @@ -1,10 +0,0 @@ -# Контроллер авторизации методом json - -Route: - -```php -Route::put('launcher/auth', 'LauncherAuthController@json'); -``` - -Добавить в **.env** строку `LAUNCHER_APIKEY=none` -Где `none` ваш apiKey \ No newline at end of file diff --git a/compat/auth/laravel/authcontroller/migrations/2020_03_05_151322_add_permission_collum.php b/compat/auth/laravel/authcontroller/migrations/2020_03_05_151322_add_permission_collum.php deleted file mode 100644 index d82e5eb2..00000000 --- a/compat/auth/laravel/authcontroller/migrations/2020_03_05_151322_add_permission_collum.php +++ /dev/null @@ -1,32 +0,0 @@ -integer('launcher_permission')->default('0'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function (Blueprint $table) { - $table->dropColumn('launcher_permission'); - }); - } -} diff --git a/compat/auth/laravel/migrations/2020_03_04_172425_create_hwid_table.php b/compat/auth/laravel/migrations/2020_03_04_172425_create_hwid_table.php deleted file mode 100644 index db0c8b9f..00000000 --- a/compat/auth/laravel/migrations/2020_03_04_172425_create_hwid_table.php +++ /dev/null @@ -1,36 +0,0 @@ -bigIncrements('id'); - $table->tinyInteger('isBanned')->default('0'); - $table->text('totalMemory'); - $table->text('serialNumber'); - $table->text('HWDiskSerial'); - $table->text('processorID'); - $table->text('macAddr'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('users_hwids'); - } -} diff --git a/compat/auth/laravel/migrations/2020_03_05_140131_add_auth_handler_collums.php b/compat/auth/laravel/migrations/2020_03_05_140131_add_auth_handler_collums.php deleted file mode 100644 index 8a456f60..00000000 --- a/compat/auth/laravel/migrations/2020_03_05_140131_add_auth_handler_collums.php +++ /dev/null @@ -1,36 +0,0 @@ -char('uuid', '36')->unique()->nullable(); - $table->char('accessToken', '32')->nullable(); - $table->string('serverID', '41')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function (Blueprint $table) { - $table->dropColumn('uuid'); - $table->dropColumn('accessToken'); - $table->dropColumn('serverID'); - }); - } -} diff --git a/compat/auth/laravel/migrations/2020_03_05_142041_add_hwid_handler_collums.php b/compat/auth/laravel/migrations/2020_03_05_142041_add_hwid_handler_collums.php deleted file mode 100644 index 5040340b..00000000 --- a/compat/auth/laravel/migrations/2020_03_05_142041_add_hwid_handler_collums.php +++ /dev/null @@ -1,32 +0,0 @@ -bigInteger('hwid')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function (Blueprint $table) { - $table->dropColumn('hwid'); - }); - } -} diff --git a/compat/auth/laravel/migrations/README.MD b/compat/auth/laravel/migrations/README.MD deleted file mode 100644 index 856151ac..00000000 --- a/compat/auth/laravel/migrations/README.MD +++ /dev/null @@ -1 +0,0 @@ -# Миграции для Laravel \ No newline at end of file diff --git a/compat/auth/phpbb.php b/compat/auth/phpbb.php deleted file mode 100644 index 4f80ad54..00000000 --- a/compat/auth/phpbb.php +++ /dev/null @@ -1,20 +0,0 @@ -login($login, $password, false, false, false); -echo($result['status'] === LOGIN_SUCCESS ? 'OK:' . $result['user_row']['username'] : 'Ошибка при авторизации'); -?> diff --git a/compat/auth/uuid/ReversibleUUIDs.java b/compat/auth/uuid/ReversibleUUIDs.java deleted file mode 100644 index b1f42baa..00000000 --- a/compat/auth/uuid/ReversibleUUIDs.java +++ /dev/null @@ -1,19 +0,0 @@ -public static UUID toUUID(String username){ - ByteBuffer buffer=ByteBuffer.wrap(Arrays.copyOf(username.getBytes(StandardCharsets.US_ASCII),16)); - return new UUID(buffer.getLong(),buffer.getLong()); // MOST, LEAST - } - -public static String toUsername(UUID uuid){ - byte[]bytes=ByteBuffer.allocate(16). - putLong(uuid.getMostSignificantBits()). - putLong(uuid.getLeastSignificantBits()).array(); - - // Find username end - int length=0; - while(lengthuser_login : 'Ошибка при авторизации'); -?> diff --git a/compat/auth/xenforo.php b/compat/auth/xenforo.php deleted file mode 100644 index 97f4ec80..00000000 --- a/compat/auth/xenforo.php +++ /dev/null @@ -1,47 +0,0 @@ -setupAutoloader($libraryDir); -XenForo_Application::initialize($libraryDir, $dir); -XenForo_Application::set('page_start_time', microtime(true)); -$db = XenForo_Application::get('db'); - -// Resolve user_id by login -$result = $db->fetchRow('SELECT user_id, username FROM xf_user WHERE username=' . $db->quote($login) . ' OR email=' . $db->quote($login)); -if(!count($result)) { - exit('Введены неверные данные'); -} -$user_id = $result['user_id']; -$username = $result['username']; - -// Get user data -$result = $db->fetchCol('SELECT data FROM xf_user_authenticate WHERE user_id=' . $db->quote($user_id)); -if(!count($result)) { - exit('Внутренняя ошибка'); // rare! -} -$data = $result[0]; - -// Select authentication core -$auth = NULL; -if(class_exists('XenForo_Authentication_Core12')) { - $auth = new XenForo_Authentication_Core12; -} else if(class_exists('XenForo_Authentication_Core')) { - $auth = new XenForo_Authentication_Core; -} else exit('Внутренняя ошибка'); // rare! - -// Try authenticate -$auth->setData($data); -$success = $auth->authenticate($user_id, $password); -echo($success ? 'OK:' . $username : 'Ошибка при авторизации'); -?> diff --git a/compat/auth/yii2/MinecraftController.php b/compat/auth/yii2/MinecraftController.php deleted file mode 100644 index 883ae454..00000000 --- a/compat/auth/yii2/MinecraftController.php +++ /dev/null @@ -1,48 +0,0 @@ -user->enableSession=false; - } - public $modelClass = 'common\models\User'; - public function behaviors() - { - return [ - 'authenticator' => [ - 'class' => QueryParamAuth::className(), - ], - ]; - } - - public function actionLogin() - { - $this->checkAccess("login"); - \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; - $postarr = json_decode(Yii::$app->getRequest()->getRawBody(), true); - if(!$postarr) return array('status' => 'ERROR','error' => "request incorrect"); - $login = $postarr["login"]; - $pass = $postarr["pass"]; - $model = User::findByUsername($login); - if($model->validatePassword($pass)) - { - if($model->status == User::STATUS_BANNED) return array('status' => 'ERROR','error' => "You Banned"); - return array('status' => 'OK', "username" => $login); - } - else - return array('status' => 'ERROR','error' => "username or password incorrect"); - } - public function checkAccess($action, $model = null, $params = []) - { - if (!\Yii::$app->user->can('checkuser')) - throw new \yii\web\ForbiddenHttpException('You can only MinecraftBot'); - } -} diff --git a/compat/authlib/GameProfile-combined.class b/compat/authlib/GameProfile-combined.class deleted file mode 100644 index edd66a8d74ad677ae0aa0869fbe26b89e64622ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2323 zcmbVNZBrXn6n<_JvSGW>5Z-FjLWSmE_a;0ij zw5qLZHGyQdV3kv4Ynxrvx?M8#e5&n`y65=rE~^zf8Z@+`TG$m38}u=wo4S2d;PTkZ z1pXT~exFD!Seu#*3A%(G8GX<@5kyJGJ#0xJ%Q+NyC(nZ_(3P{*!VX1VRr7`>;gN)I z1g^Nzyq7vHo{anWN+zT)1v-kFogt+nWAT@%3iP!$y@-7J3jv7^vZT&xr73C`?YXiv zC7hu1Zz7_s*A}dD#n5cZkbf+`!6esMh0jP-?c2I)P-6PM*SwqG)(Uo-T_r5bxQMKb zA!G$YCAC&!U7JuDHr-*<9WvRLlXD55%D9eCcvxg@Z}V!NhdFZ7Ygsp|a?Yw(3)-S? z5L|ePZcF#vqOVCVFa;lCRKWsBji6eoXeKGT5qQ zwN$>Y8=G1+wd!)4cfQjKx^b4lmjoW1g6YX{ON{>$B#g`}q^0_tdQ;X4uHiielSnC8 z!ClglN@KxLYm~p<6IIpROiNf*@HukSgL-Ynvgb*Y9f7F#z6&L_nxi7n%z{P<7Z`md zD@X1%YWtdkD;Slqq2K}5iN{veDm!&M>Vmgl2e$>h)h;mXso-PR)!m9Vx2aZat*Ri5 z9t98aHIZj@Cpgjbl6MQ>lqL%|pD0gEf$o#9mI4`P6ok;pv8c38bU+K4(lpYB${740 z8FSTQy{wt`?e7a(#nvrTL6KFK^jcG51q!+tb-URmgc0{#_w}zHH9|X{Q+fhJryTdR zi$IK@ikNC{#xl2J1=TbyJC?WXQY^2<@|<;CqCS-9Z4V&AccxW@1!&I1mS!Kf1kDPF z1A1tT&{qzA`U6sl1N0^i(YJnp{(TH2pQCU583rGt>k#MGBjNyW{gFuS<9uR#AJJdv zh`hz3crM)go_fr6>JG(*bQ*Q4bY!RHsK`k1QIP{;|I9Zh8ch_8+^gO1T(}i zKE@-E5xng}F=s*W9f@CY{wXau(g+22t}^bLd)fRP97yKnGhAk8hpq(QnMH;dc<1%N z)B!HAH*T~QcMS1U%mXcR0!i0ANi(w^WG+YONi;yhPCSMbc!Gd`@0eN#eEqZROAi2z zoSh#iYn&Z5k^C7QfxYAry6OB>l72s-!@rmO6TxK%xR0lC`Ze(Gk2p)0=Z_=yB1`lL z>=32BXaiS|9cZ5%0&NyybV}XgZ(N{+2E|~I3DL9U5_(94d_-u%iP^QW0ZXRdAo4+)Z;bQohMjvMX1!q|mUjP6A diff --git a/compat/authlib/MinecraftSessionService-combined.class b/compat/authlib/MinecraftSessionService-combined.class deleted file mode 100644 index 854101de1634b5bbe00acf95d2bf0884919f8ff3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1177 zcmbVM%TC)s6g?LLE{_%{k3vg#T{N3oLUd6DArJyY1)`GEF1njImoSzyj>Z!NAH+|v z=m+$p5O+cd0a-F+GmmSZd+y`h`G0%!55NXK2UrjAi7=gH+C*$G*b)xE9>-ZbY-fow ztx$E{d8!-Xp=$Flo1N*DYsZPYP+{snN6u=~DzH@lh}-?km^)5qCJ*qDFn6xk5FdQA+){dQa7LIt@=$ zr$(5Hbjv93fpGn52U|roX-lPJtIk|_@^I>RupjG}`c+4|Sc?iU|tB{U*lp3H~%=B zr;UVT_u>LPE$k$LFec9gFi|0lqaybSx%qukECJpOS*CiH>1UQ1%!=i$pvLe{{+Ppj U@4V1k-(yjBk6FSpR(96z0Da?oTmS$7 diff --git a/compat/authlib/README.md b/compat/authlib/README.md deleted file mode 100644 index 0187d027..00000000 --- a/compat/authlib/README.md +++ /dev/null @@ -1,15 +0,0 @@ -com.mojang.authlib-clean.jar ------------------ -Этот JAR - заготовка для сборки LauncherAuthlib. Из неё удалены не используемые клиентом классы, а так же классы, -реализованные в LauncherAuthlib. - -GameProfile-combined.class --------------------------- -Этот класс - результат слияния ASM'ом методов из Authlib 1.7.2 и Authlib 1.7.10+, в нём есть метод как для получения -UUID старого образца (без чёрточек, например `d3730e7436794ba6-8ab2a24ac9e755d4`), так и нового -образца (`d3730e74-3679-4ba6-8ab2-a24ac9e755d4`). Уже включён в `com.mojang.authlib-clean.jar` - -MinecraftSessionService-combined.class --------------------------------------- -Этот класс - результат слияния ASM'ом методов из Authlib 1.10.2 и Authlib 1.11+, в нём есть метод как для авторизации на -сервере с учётом InetAddress, так и без него. Уже включён в `com.mojang.authlib-clean.jar` diff --git a/compat/authlib/authlib-clean.jar b/compat/authlib/authlib-clean.jar deleted file mode 100644 index 0a934fe4b877ed77595ce433e37fe83eb8a2800f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23983 zcmbTe1yE*7vMr1|-MG8EySux4V;}DB?(XjH?(R+ljk~*hH_-5N?wmXG&fGcg#{YH% zA3KPu4dlwo%3Qg2DM*8Y!2kh4K>@+*(n$h+ULb#bd|qImUq-gp^q@cre>(>D&oS1v z76vw^|JR|&e;sPz>||zTZumc@WR6B_YkmF+8lS%&?>|owGzHi=(HU78I68VOt;-=R zqUe_5t{GtD#Xu!RqKTTp7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