diff --git a/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/api/PlayerDataManager.java b/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/api/PlayerDataManager.java index 2606817d..5b77d338 100644 --- a/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/api/PlayerDataManager.java +++ b/RedisBungee-API/src/main/java/com/imaginarycode/minecraft/redisbungee/api/PlayerDataManager.java @@ -41,7 +41,6 @@ public abstract class PlayerDataManager lastServerCache = Caffeine.newBuilder().expireAfterWrite(1, TimeUnit.HOURS).build(this::getLastServerFromRedis); private final LoadingCache proxyCache = Caffeine.newBuilder().expireAfterWrite(1, TimeUnit.HOURS).build(this::getProxyFromRedis); private final LoadingCache ipCache = Caffeine.newBuilder().expireAfterWrite(1, TimeUnit.HOURS).build(this::getIpAddressFromRedis); - private final LoadingCache lastOnlineCache = Caffeine.newBuilder().expireAfterWrite(1, TimeUnit.HOURS).build(this::getLastOnlineFromRedis); private final Object SERVERS_TO_PLAYERS_KEY = new Object(); private final LoadingCache> serverToPlayersCache = Caffeine.newBuilder().expireAfterWrite(10, TimeUnit.MINUTES).build(this::serversToPlayersBuilder); private final UnifiedJedis unifiedJedis; @@ -80,7 +79,6 @@ protected void handleNetworkPlayerQuit(IPlayerLeftNetworkEvent event) { this.proxyCache.invalidate(event.getUuid()); this.serverCache.invalidate(event.getUuid()); this.ipCache.invalidate(event.getUuid()); - this.lastOnlineCache.invalidate(event.getUuid()); } protected void handlePubSubMessageEvent(IPubSubMessageEvent event) { @@ -228,7 +226,7 @@ public InetAddress getIpFor(UUID uuid) { } public long getLastOnline(UUID uuid) { - return this.lastOnlineCache.get(uuid); + return getLastOnlineFromRedis(uuid); } public Multimap serversToPlayers() {