mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-09 09:09:46 +03:00
[FEATURE] ClientLaunchPhase event
This commit is contained in:
parent
f61cf67606
commit
8f42175ad4
3 changed files with 14 additions and 6 deletions
|
@ -39,12 +39,6 @@ public class User {
|
||||||
public String serverID;
|
public String serverID;
|
||||||
private String password_salt;
|
private String password_salt;
|
||||||
public long permissions;
|
public long permissions;
|
||||||
//TODO: заменить EAGER на LASY и придумать способ сохранить сессию
|
|
||||||
// [ERROR] org.hibernate.LazyInitializationException:
|
|
||||||
// failed to lazily initialize a collection of role: pro.gravit.launchserver.dao.User.hwids, could not initialize proxy - no Session
|
|
||||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
|
||||||
@JoinColumn(name = "user_id")
|
|
||||||
public Collection<UserHWID> hwids;
|
|
||||||
public void setPassword(String password)
|
public void setPassword(String password)
|
||||||
{
|
{
|
||||||
password_salt = SecurityHelper.randomStringAESKey();
|
password_salt = SecurityHelper.randomStringAESKey();
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
import pro.gravit.launcher.LauncherEngine;
|
import pro.gravit.launcher.LauncherEngine;
|
||||||
import pro.gravit.launcher.api.AuthService;
|
import pro.gravit.launcher.api.AuthService;
|
||||||
import pro.gravit.launcher.api.ClientService;
|
import pro.gravit.launcher.api.ClientService;
|
||||||
|
import pro.gravit.launcher.client.events.ClientLaunchPhase;
|
||||||
import pro.gravit.launcher.client.events.ClientLauncherInitPhase;
|
import pro.gravit.launcher.client.events.ClientLauncherInitPhase;
|
||||||
import pro.gravit.launcher.guard.LauncherGuardManager;
|
import pro.gravit.launcher.guard.LauncherGuardManager;
|
||||||
import pro.gravit.launcher.gui.JSRuntimeProvider;
|
import pro.gravit.launcher.gui.JSRuntimeProvider;
|
||||||
|
@ -543,6 +544,7 @@ public static void main(String... args) throws Throwable {
|
||||||
CommonHelper.newThread("Client Directory Watcher", true, clientWatcher).start();
|
CommonHelper.newThread("Client Directory Watcher", true, clientWatcher).start();
|
||||||
verifyHDir(params.assetDir, assetHDir, assetMatcher, digest);
|
verifyHDir(params.assetDir, assetHDir, assetMatcher, digest);
|
||||||
verifyHDir(params.clientDir, clientHDir, clientMatcher, digest);
|
verifyHDir(params.clientDir, clientHDir, clientMatcher, digest);
|
||||||
|
LauncherEngine.modulesManager.invokeEvent(new ClientLaunchPhase(params));
|
||||||
launch(profile, params);
|
launch(profile, params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
package pro.gravit.launcher.client.events;
|
||||||
|
|
||||||
|
import pro.gravit.launcher.client.ClientLauncher;
|
||||||
|
import pro.gravit.launcher.modules.LauncherModule;
|
||||||
|
|
||||||
|
public class ClientLaunchPhase extends LauncherModule.Event {
|
||||||
|
public final ClientLauncher.Params params;
|
||||||
|
|
||||||
|
public ClientLaunchPhase(ClientLauncher.Params params) {
|
||||||
|
this.params = params;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue