Cleanup
@ljacqu What to do with the management instance in the main class (unused now)
This commit is contained in:
parent
c9718ae86c
commit
7fc195336f
@ -635,19 +635,4 @@ public class AuthMe extends JavaPlugin {
|
|||||||
// Handle the command
|
// Handle the command
|
||||||
return commandHandler.processCommand(sender, commandLabel, args);
|
return commandHandler.processCommand(sender, commandLabel, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------
|
|
||||||
// Service getters (deprecated)
|
|
||||||
// Use @Inject fields instead
|
|
||||||
// -------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return process manager
|
|
||||||
*
|
|
||||||
* @deprecated should be used in API classes only (temporarily)
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public Management getManagement() {
|
|
||||||
return management;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import fr.xephi.authme.cache.auth.PlayerAuth;
|
|||||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||||
import fr.xephi.authme.datasource.DataSource;
|
import fr.xephi.authme.datasource.DataSource;
|
||||||
import fr.xephi.authme.security.crypts.HashedPassword;
|
import fr.xephi.authme.security.crypts.HashedPassword;
|
||||||
import fr.xephi.authme.settings.Settings;
|
|
||||||
import fr.xephi.authme.util.BukkitService;
|
import fr.xephi.authme.util.BukkitService;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.messaging.PluginMessageListener;
|
import org.bukkit.plugin.messaging.PluginMessageListener;
|
||||||
@ -26,9 +25,6 @@ public class BungeeCordMessage implements PluginMessageListener {
|
|||||||
@Inject
|
@Inject
|
||||||
private PlayerCache playerCache;
|
private PlayerCache playerCache;
|
||||||
|
|
||||||
@Inject
|
|
||||||
private Settings settings;
|
|
||||||
|
|
||||||
BungeeCordMessage() { }
|
BungeeCordMessage() { }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import fr.xephi.authme.output.MessageKey;
|
|||||||
import fr.xephi.authme.permission.AuthGroupType;
|
import fr.xephi.authme.permission.AuthGroupType;
|
||||||
import fr.xephi.authme.permission.PlayerStatePermission;
|
import fr.xephi.authme.permission.PlayerStatePermission;
|
||||||
import fr.xephi.authme.process.AsynchronousProcess;
|
import fr.xephi.authme.process.AsynchronousProcess;
|
||||||
|
import fr.xephi.authme.process.Management;
|
||||||
import fr.xephi.authme.process.ProcessService;
|
import fr.xephi.authme.process.ProcessService;
|
||||||
import fr.xephi.authme.settings.properties.HooksSettings;
|
import fr.xephi.authme.settings.properties.HooksSettings;
|
||||||
import fr.xephi.authme.settings.properties.PluginSettings;
|
import fr.xephi.authme.settings.properties.PluginSettings;
|
||||||
@ -66,6 +67,9 @@ public class AsynchronousJoin implements AsynchronousProcess {
|
|||||||
@Inject
|
@Inject
|
||||||
private PlayerDataTaskManager playerDataTaskManager;
|
private PlayerDataTaskManager playerDataTaskManager;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Management management;
|
||||||
|
|
||||||
AsynchronousJoin() {
|
AsynchronousJoin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +142,7 @@ public class AsynchronousJoin implements AsynchronousProcess {
|
|||||||
playerCache.removePlayer(name);
|
playerCache.removePlayer(name);
|
||||||
if (auth != null && auth.getIp().equals(ip)) {
|
if (auth != null && auth.getIp().equals(ip)) {
|
||||||
service.send(player, MessageKey.SESSION_RECONNECTION);
|
service.send(player, MessageKey.SESSION_RECONNECTION);
|
||||||
plugin.getManagement().performLogin(player, "dontneed", true);
|
management.performLogin(player, "dontneed", true);
|
||||||
return;
|
return;
|
||||||
} else if (service.getProperty(PluginSettings.SESSIONS_EXPIRE_ON_IP_CHANGE)) {
|
} else if (service.getProperty(PluginSettings.SESSIONS_EXPIRE_ON_IP_CHANGE)) {
|
||||||
service.send(player, MessageKey.SESSION_EXPIRED);
|
service.send(player, MessageKey.SESSION_EXPIRED);
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import fr.xephi.authme.mail.SendMailSSL;
|
|||||||
import fr.xephi.authme.output.MessageKey;
|
import fr.xephi.authme.output.MessageKey;
|
||||||
import fr.xephi.authme.permission.PermissionsManager;
|
import fr.xephi.authme.permission.PermissionsManager;
|
||||||
import fr.xephi.authme.process.AsynchronousProcess;
|
import fr.xephi.authme.process.AsynchronousProcess;
|
||||||
|
import fr.xephi.authme.process.Management;
|
||||||
import fr.xephi.authme.process.ProcessService;
|
import fr.xephi.authme.process.ProcessService;
|
||||||
import fr.xephi.authme.process.SyncProcessManager;
|
import fr.xephi.authme.process.SyncProcessManager;
|
||||||
import fr.xephi.authme.security.HashAlgorithm;
|
import fr.xephi.authme.security.HashAlgorithm;
|
||||||
@ -32,9 +33,6 @@ import static fr.xephi.authme.permission.PlayerStatePermission.ALLOW_MULTIPLE_AC
|
|||||||
|
|
||||||
public class AsyncRegister implements AsynchronousProcess {
|
public class AsyncRegister implements AsynchronousProcess {
|
||||||
|
|
||||||
@Inject
|
|
||||||
private AuthMe plugin;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private DataSource database;
|
private DataSource database;
|
||||||
|
|
||||||
@ -59,6 +57,9 @@ public class AsyncRegister implements AsynchronousProcess {
|
|||||||
@Inject
|
@Inject
|
||||||
private SendMailSSL sendMailSsl;
|
private SendMailSSL sendMailSsl;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private Management management;
|
||||||
|
|
||||||
AsyncRegister() { }
|
AsyncRegister() { }
|
||||||
|
|
||||||
private boolean preRegisterCheck(Player player, String password) {
|
private boolean preRegisterCheck(Player player, String password) {
|
||||||
@ -163,7 +164,7 @@ public class AsyncRegister implements AsynchronousProcess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!service.getProperty(RegistrationSettings.FORCE_LOGIN_AFTER_REGISTER) && autoLogin) {
|
if (!service.getProperty(RegistrationSettings.FORCE_LOGIN_AFTER_REGISTER) && autoLogin) {
|
||||||
plugin.getManagement().performLogin(player, "dontneed", true);
|
management.performLogin(player, "dontneed", true);
|
||||||
}
|
}
|
||||||
syncProcessManager.processSyncPasswordRegister(player);
|
syncProcessManager.processSyncPasswordRegister(player);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user