implement Redis

master
Alex 2022-03-20 21:04:51 +01:00
parent 9a2f0ab15c
commit 6116e069a9
2 changed files with 3 additions and 4 deletions

View File

@ -12,9 +12,8 @@ public class PlayerDisconnectListener implements Listener {
public void onDisconnect(PlayerDisconnectEvent event) {
ProxiedPlayer proxiedPlayer = event.getPlayer();
ProxySystem.getInstance().getRedisManager().getCommands()
.getdel("player:" + proxiedPlayer.getUniqueId().toString());
ProxySystem.getInstance().getRedisManager().getKeyReactiveCommands()
.del("player:" + proxiedPlayer.getUniqueId().toString());
//String uuid = ProxySystem.getInstance().getFormatter()
// .formatUuid(proxiedPlayer.getUniqueId().toString());

View File

@ -20,7 +20,7 @@ public class RedisManager {
this.client = RedisClient.create(this.getConnectionUri());
this.connection = client.connect();
this.commands = connection.sync();
this.keyReactiveCommands = client.connect().reactive();
this.keyReactiveCommands = this.getConnection().reactive();
this.getKeyReactiveCommands().del("player");
}