Implement bungee messaging, CacheDataSource sync

This commit is contained in:
Gabriele C
2017-10-30 10:38:13 +01:00
parent a5542051f4
commit 2d2eb740e3
21 changed files with 233 additions and 25 deletions
@@ -10,6 +10,7 @@ import fr.xephi.authme.process.AsynchronousProcess;
import fr.xephi.authme.process.register.executors.RegistrationExecutor;
import fr.xephi.authme.process.register.executors.RegistrationParameters;
import fr.xephi.authme.process.register.executors.RegistrationMethod;
import fr.xephi.authme.service.BungeeService;
import fr.xephi.authme.service.CommonService;
import fr.xephi.authme.settings.properties.RegistrationSettings;
import fr.xephi.authme.settings.properties.RestrictionSettings;
@@ -36,6 +37,8 @@ public class AsyncRegister implements AsynchronousProcess {
private PermissionsManager permissionsManager;
@Inject
private SingletonStore<RegistrationExecutor> registrationExecutorFactory;
@Inject
private BungeeService bungeeService;
AsyncRegister() {
}
@@ -84,6 +87,7 @@ public class AsyncRegister implements AsynchronousProcess {
PlayerAuth auth = executor.buildPlayerAuth(parameters);
if (database.saveAuth(auth)) {
executor.executePostPersistAction(parameters);
bungeeService.sendRegister(parameters.getPlayerName());
} else {
service.send(parameters.getPlayer(), MessageKey.ERROR);
}