#604 - Move ProtocolLib adapters to new package and add ProtocolLibService

This commit is contained in:
Gnat008
2016-06-27 15:38:43 -04:00
parent 1361174892
commit 23836cda6a
10 changed files with 188 additions and 109 deletions
@@ -6,6 +6,7 @@ import fr.xephi.authme.AuthMe;
import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.cache.SessionManager;
import fr.xephi.authme.events.LogoutEvent;
import fr.xephi.authme.listener.protocollib.ProtocolLibService;
import fr.xephi.authme.output.MessageKey;
import fr.xephi.authme.process.ProcessService;
import fr.xephi.authme.process.SynchronousProcess;
@@ -34,6 +35,9 @@ public class ProcessSynchronousPlayerLogout implements SynchronousProcess {
@Inject
private BukkitService bukkitService;
@Inject
private ProtocolLibService protocolLibService;
@Inject
private LimboPlayerTaskManager limboPlayerTaskManager;
@@ -66,7 +70,7 @@ public class ProcessSynchronousPlayerLogout implements SynchronousProcess {
sessionManager.cancelSession(name);
}
if (service.getProperty(RestrictionSettings.PROTECT_INVENTORY_BEFORE_LOGIN)) {
plugin.getInventoryProtector().sendBlankInventoryPacket(player);
protocolLibService.sendBlankInventoryPacket(player);
}
limboPlayerTaskManager.registerTimeoutTask(player);