implement Redis

master
Alex 2022-03-20 21:08:42 +01:00
parent 6116e069a9
commit 6a6b0ceb32
2 changed files with 4 additions and 3 deletions

View File

@ -14,6 +14,9 @@ public class PlayerDisconnectListener implements Listener {
ProxySystem.getInstance().getRedisManager().getKeyReactiveCommands()
.del("player:" + proxiedPlayer.getUniqueId().toString());
ProxySystem.getInstance().getLogger().info("player disconnected: " + proxiedPlayer.getName());
//String uuid = ProxySystem.getInstance().getFormatter()
// .formatUuid(proxiedPlayer.getUniqueId().toString());

View File

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