Merge 765-teleport-handling into jsoncache-fix
This commit is contained in:
@@ -12,6 +12,7 @@ import fr.xephi.authme.process.SyncProcessManager;
|
||||
import fr.xephi.authme.settings.SpawnLoader;
|
||||
import fr.xephi.authme.settings.properties.PluginSettings;
|
||||
import fr.xephi.authme.settings.properties.RestrictionSettings;
|
||||
import fr.xephi.authme.util.BukkitService;
|
||||
import fr.xephi.authme.util.Utils;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -44,6 +45,9 @@ public class AsynchronousQuit implements AsynchronousProcess {
|
||||
@Inject
|
||||
private SpawnLoader spawnLoader;
|
||||
|
||||
@Inject
|
||||
private BukkitService bukkitService;
|
||||
|
||||
AsynchronousQuit() {
|
||||
}
|
||||
|
||||
@@ -76,7 +80,7 @@ public class AsynchronousQuit implements AsynchronousProcess {
|
||||
playerCache.removePlayer(name);
|
||||
|
||||
if (plugin.isEnabled() && service.getProperty(PluginSettings.SESSIONS_ENABLED)) {
|
||||
BukkitTask task = plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() {
|
||||
BukkitTask task = bukkitService.runTaskLaterAsynchronously(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
@@ -2,6 +2,7 @@ package fr.xephi.authme.process.quit;
|
||||
|
||||
import fr.xephi.authme.cache.backup.PlayerDataStorage;
|
||||
import fr.xephi.authme.cache.limbo.LimboCache;
|
||||
import fr.xephi.authme.permission.AuthGroupHandler;
|
||||
import fr.xephi.authme.process.ProcessService;
|
||||
import fr.xephi.authme.process.SynchronousProcess;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -20,6 +21,9 @@ public class ProcessSyncronousPlayerQuit implements SynchronousProcess {
|
||||
@Inject
|
||||
private LimboCache limboCache;
|
||||
|
||||
@Inject
|
||||
private AuthGroupHandler authGroupHandler;
|
||||
|
||||
public void processSyncQuit(Player player) {
|
||||
if (limboCache.hasPlayerData(player.getName().toLowerCase())) { // it mean player is not authenticated
|
||||
limboCache.removeFromCache(player);
|
||||
|
||||
Reference in New Issue
Block a user