Implement bungee messaging, CacheDataSource sync
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user