Merge branch 'pre-injector'
This commit is contained in:
@@ -44,8 +44,8 @@ public class Management {
|
||||
runTask(new AsynchronousLogout(player, plugin, dataSource, processService));
|
||||
}
|
||||
|
||||
public void performRegister(final Player player, final String password, final String email) {
|
||||
runTask(new AsyncRegister(player, password, email, plugin, dataSource, playerCache, processService));
|
||||
public void performRegister(final Player player, final String password, final String email, final boolean autoLogin) {
|
||||
runTask(new AsyncRegister(player, password, email, plugin, dataSource, playerCache, processService, autoLogin));
|
||||
}
|
||||
|
||||
public void performUnregister(final Player player, final String password, final boolean force) {
|
||||
|
||||
@@ -37,9 +37,10 @@ public class AsyncRegister implements Process {
|
||||
private final DataSource database;
|
||||
private final PlayerCache playerCache;
|
||||
private final ProcessService service;
|
||||
private final boolean autoLogin;
|
||||
|
||||
public AsyncRegister(Player player, String password, String email, AuthMe plugin, DataSource data,
|
||||
PlayerCache playerCache, ProcessService service) {
|
||||
PlayerCache playerCache, ProcessService service, boolean autoLogin) {
|
||||
this.player = player;
|
||||
this.password = password;
|
||||
this.name = player.getName().toLowerCase();
|
||||
@@ -49,6 +50,7 @@ public class AsyncRegister implements Process {
|
||||
this.ip = Utils.getPlayerIp(player);
|
||||
this.playerCache = playerCache;
|
||||
this.service = service;
|
||||
this.autoLogin = autoLogin;
|
||||
}
|
||||
|
||||
private boolean preRegisterCheck() {
|
||||
@@ -150,7 +152,7 @@ public class AsyncRegister implements Process {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Settings.forceRegLogin) {
|
||||
if (!Settings.forceRegLogin && autoLogin) {
|
||||
//PlayerCache.getInstance().addPlayer(auth);
|
||||
//database.setLogged(name);
|
||||
// TODO: check this...
|
||||
|
||||
Reference in New Issue
Block a user