[FIX] Доступ из модуля к созданию своих защит

This commit is contained in:
Gravit 2019-10-19 23:57:23 +07:00
parent b9761637db
commit 0cab4f254e
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -9,22 +9,25 @@ public class LauncherGuardManager {
public static LauncherGuardInterface guard; public static LauncherGuardInterface guard;
public static void initGuard(boolean clientInstance) { public static void initGuard(boolean clientInstance) {
LauncherConfig config = Launcher.getConfig(); if(guard == null)
switch (config.guardType) { {
case "gravitguard": { LauncherConfig config = Launcher.getConfig();
guard = new LauncherStdGuard(); switch (config.guardType) {
break; case "stdguard": {
} guard = new LauncherStdGuard();
case "wrapper": { break;
guard = new LauncherWrapperGuard(); }
break; case "wrapper": {
} guard = new LauncherWrapperGuard();
case "java": { break;
guard = new LauncherJavaGuard(); }
break; case "java": {
} guard = new LauncherJavaGuard();
default: { break;
guard = new LauncherNoGuard(); }
default: {
guard = new LauncherNoGuard();
}
} }
} }
guard.init(clientInstance); guard.init(clientInstance);