mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-03 09:10:01 +01:00
Fix player being unable to walk after admin registration
- Fix sessions still working after being disabled on reload
This commit is contained in:
parent
c040623739
commit
1c3ca520dc
@ -27,7 +27,7 @@ public class SessionManager implements SettingsDependent {
|
||||
* @return True if a session is found.
|
||||
*/
|
||||
public boolean hasSession(String name) {
|
||||
return sessions.containsKey(name);
|
||||
return enabled && sessions.containsKey(name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,6 +2,7 @@ package fr.xephi.authme.command.executable.authme;
|
||||
|
||||
import fr.xephi.authme.ConsoleLogger;
|
||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.cache.limbo.LimboCache;
|
||||
import fr.xephi.authme.command.CommandService;
|
||||
import fr.xephi.authme.command.ExecutableCommand;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
@ -37,6 +38,9 @@ public class RegisterAdminCommand implements ExecutableCommand {
|
||||
@Inject
|
||||
private ValidationService validationService;
|
||||
|
||||
@Inject
|
||||
private LimboCache limboCache;
|
||||
|
||||
@Override
|
||||
public void executeCommand(final CommandSender sender, List<String> arguments) {
|
||||
// Get the player name and password
|
||||
@ -79,6 +83,7 @@ public class RegisterAdminCommand implements ExecutableCommand {
|
||||
bukkitService.scheduleSyncDelayedTask(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
limboCache.restoreData(player);
|
||||
player.kickPlayer(commandService.retrieveSingle(MessageKey.KICK_FOR_ADMIN_REGISTER));
|
||||
}
|
||||
});
|
||||
|
@ -5,7 +5,6 @@ import fr.xephi.authme.ConsoleLogger;
|
||||
import fr.xephi.authme.initialization.SettingsDependent;
|
||||
import fr.xephi.authme.settings.NewSetting;
|
||||
import fr.xephi.authme.settings.properties.RestrictionSettings;
|
||||
import fr.xephi.authme.util.BukkitService;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@ -23,12 +22,10 @@ public class ProtocolLibService implements SettingsDependent {
|
||||
/* Service */
|
||||
private boolean isEnabled;
|
||||
private AuthMe plugin;
|
||||
private BukkitService bukkitService;
|
||||
|
||||
@Inject
|
||||
ProtocolLibService(AuthMe plugin, BukkitService bukkitService, NewSetting settings) {
|
||||
ProtocolLibService(AuthMe plugin, NewSetting settings) {
|
||||
this.plugin = plugin;
|
||||
this.bukkitService = bukkitService;
|
||||
loadSettings(settings);
|
||||
setup();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user