mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] NPE in MysqlHWIDProvider
This commit is contained in:
parent
98431cc796
commit
2a9a4256f9
3 changed files with 24 additions and 0 deletions
|
@ -105,4 +105,16 @@ public Map<String, Command> getCommands() {
|
|||
public boolean onJoinServer(String serverID, String username, Client client) {
|
||||
return !enableHardwareFeature || (client.trustLevel != null && client.trustLevel.hardwareInfo != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
if(provider != null)
|
||||
provider.init();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
if(provider != null)
|
||||
provider.close();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,5 +20,15 @@ public static void registerHandlers() {
|
|||
public abstract boolean allowGetAccessToken(AuthResponse.AuthContext context);
|
||||
|
||||
public abstract void checkLaunchServerLicense(); //Выдает SecurityException при ошибке проверки лицензии
|
||||
|
||||
public void init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void close()
|
||||
{
|
||||
|
||||
}
|
||||
//public abstract
|
||||
}
|
||||
|
|
|
@ -184,6 +184,7 @@ public void init(LaunchServer.ReloadType type) {
|
|||
}
|
||||
if (protectHandler != null) {
|
||||
server.registerObject("protectHandler", protectHandler);
|
||||
protectHandler.init();
|
||||
protectHandler.checkLaunchServerLicense();
|
||||
}
|
||||
if (components != null) {
|
||||
|
@ -226,6 +227,7 @@ public void close(LaunchServer.ReloadType type) {
|
|||
}
|
||||
if (protectHandler != null) {
|
||||
server.unregisterObject("protectHandler", protectHandler);
|
||||
protectHandler.close();
|
||||
}
|
||||
if (dao != null) {
|
||||
server.unregisterObject("dao", dao);
|
||||
|
|
Loading…
Reference in a new issue