From 470164a80c1b50ca16d5ccc7cf803cdf099aebe9 Mon Sep 17 00:00:00 2001 From: zaxar163 Date: Thu, 17 Jan 2019 19:41:33 +0300 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BA=D0=B8=20=D0=B1=D0=B5=D0=B7=D0=BE=D0=BF=D0=B0=D1=81=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=B8=20=D0=B2=20loadModuleFull.=20+=20[FIX]?= =?UTF-8?q?=20finishModules=20=D0=B2=20launchServer.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/ru/gravit/launchserver/LaunchServer.java | 1 + .../java/ru/gravit/launcher/client/ClientModuleManager.java | 5 +++++ .../ru/gravit/launcher/managers/SimpleModuleManager.java | 1 + 3 files changed, 7 insertions(+) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 596cd766..ced4b54a 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -585,6 +585,7 @@ public void run() { JVMHelper.RUNTIME.addShutdownHook(CommonHelper.newThread(null, false, this::close)); CommonHelper.newThread("Command Thread", true, commandHandler).start(); rebindServerSocket(); + modulesManager.finishModules(); } diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/ClientModuleManager.java b/Launcher/src/main/java/ru/gravit/launcher/client/ClientModuleManager.java index 56e0a98d..3beac090 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/ClientModuleManager.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/ClientModuleManager.java @@ -16,4 +16,9 @@ public ClientModuleManager(LauncherEngine engine) { public void loadModule(URL jarpath, String classname) { throw new SecurityException("Custom JAR's load not allowed here"); } + + @Override + public void loadModuleFull(URL jarpath) { + throw new SecurityException("Custom JAR's load not allowed here"); + } } diff --git a/libLauncher/src/main/java/ru/gravit/launcher/managers/SimpleModuleManager.java b/libLauncher/src/main/java/ru/gravit/launcher/managers/SimpleModuleManager.java index effa9adf..fc4202d5 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/managers/SimpleModuleManager.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/managers/SimpleModuleManager.java @@ -86,6 +86,7 @@ public void loadModuleFull(URL jarpath) throws ClassNotFoundException, IllegalAc module.preInit(context); module.init(context); module.postInit(context); + module.finish(context); LogHelper.info("Module %s version: %s loaded", module.getName(), module.getVersion()); } }