2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2026-04-09 00:20:26 +00:00

properly cache last online and its invalidation

This commit is contained in:
2024-05-18 16:37:31 +04:00
parent 0871bda3f3
commit d6b3956a96
6 changed files with 37 additions and 7 deletions

View File

@@ -151,7 +151,7 @@ public class RedisBungeeVelocityPlugin implements RedisBungeePlugin<Player>, Con
}
@Override
public PlayerDataManager<Player, ?, ?, ?, ?, ?, ?> playerDataManager() {
public PlayerDataManager<Player, ?, ?, ?, ?, ?, ?, ?> playerDataManager() {
return this.playerDataManager;
}

View File

@@ -14,6 +14,7 @@ import com.imaginarycode.minecraft.redisbungee.api.PlayerDataManager;
import com.imaginarycode.minecraft.redisbungee.api.RedisBungeePlugin;
import com.imaginarycode.minecraft.redisbungee.api.config.RedisBungeeConfiguration;
import com.imaginarycode.minecraft.redisbungee.events.PlayerChangedServerNetworkEvent;
import com.imaginarycode.minecraft.redisbungee.events.PlayerJoinedNetworkEvent;
import com.imaginarycode.minecraft.redisbungee.events.PlayerLeftNetworkEvent;
import com.imaginarycode.minecraft.redisbungee.events.PubSubMessageEvent;
import com.velocitypowered.api.event.Continuation;
@@ -28,7 +29,7 @@ import net.kyori.adventure.text.Component;
import java.util.concurrent.TimeUnit;
public class VelocityPlayerDataManager extends PlayerDataManager<Player, PostLoginEvent, DisconnectEvent, PubSubMessageEvent, PlayerChangedServerNetworkEvent, PlayerLeftNetworkEvent, ServerConnectedEvent> {
public class VelocityPlayerDataManager extends PlayerDataManager<Player, PostLoginEvent, DisconnectEvent, PubSubMessageEvent, PlayerChangedServerNetworkEvent, PlayerLeftNetworkEvent, ServerConnectedEvent, PlayerJoinedNetworkEvent> {
public VelocityPlayerDataManager(RedisBungeePlugin<Player> plugin) {
super(plugin);
}
@@ -45,6 +46,12 @@ public class VelocityPlayerDataManager extends PlayerDataManager<Player, PostLog
handleNetworkPlayerQuit(event);
}
@Override
@Subscribe
public void onNetworkPlayerJoin(PlayerJoinedNetworkEvent event) {
handleNetworkPlayerJoin(event);
}
@Override
@Subscribe
public void onPubSubMessageEvent(PubSubMessageEvent event) {