[FIX] Возможность модулям определить, запущены ли они после старта клиента.

This commit is contained in:
Zaxar163 2019-10-11 07:31:29 +02:00
parent e0c38f545d
commit 96a6fbb359
No known key found for this signature in database
GPG key ID: 1FE4F2E1F053831B
3 changed files with 3 additions and 3 deletions

View file

@ -28,6 +28,7 @@
import pro.gravit.utils.helper.LogHelper;
public class LauncherEngine {
public static final AtomicBoolean IS_CLIENT = new AtomicBoolean(false);
public static void main(String... args) throws Throwable {
JVMHelper.checkStackTrace(LauncherEngine.class);

View file

@ -443,13 +443,12 @@ public ClientLaunchContext(Params params, ClientProfile profile, HashedDir asset
@LauncherAPI
public static void main(String... args) throws Throwable {
LauncherEngine.IS_CLIENT.set(true);
LauncherEngine engine = LauncherEngine.clientInstance();
//Launcher.modulesManager = new ClientModuleManager(engine);
LauncherEngine.modulesManager = new ClientModuleManager();
LauncherConfig.getAutogenConfig().initModules(); //INIT
LauncherEngine.modulesManager.initModules(null);
initGson(LauncherEngine.modulesManager);
//Launcher.modulesManager.preInitModules();
if (!LauncherAgent.isStarted()) {
NativeJVMHalt.haltA(100);
return;

@ -1 +1 @@
Subproject commit 42f29101e441d85b15920b9657c447e08cf6af73
Subproject commit a4cf6a2f71892f65ef6202d1c254a073f2d7ca6f