implement Redis
parent
9a2f0ab15c
commit
6116e069a9
|
@ -12,9 +12,8 @@ public class PlayerDisconnectListener implements Listener {
|
||||||
public void onDisconnect(PlayerDisconnectEvent event) {
|
public void onDisconnect(PlayerDisconnectEvent event) {
|
||||||
ProxiedPlayer proxiedPlayer = event.getPlayer();
|
ProxiedPlayer proxiedPlayer = event.getPlayer();
|
||||||
|
|
||||||
ProxySystem.getInstance().getRedisManager().getCommands()
|
ProxySystem.getInstance().getRedisManager().getKeyReactiveCommands()
|
||||||
.getdel("player:" + proxiedPlayer.getUniqueId().toString());
|
.del("player:" + proxiedPlayer.getUniqueId().toString());
|
||||||
|
|
||||||
//String uuid = ProxySystem.getInstance().getFormatter()
|
//String uuid = ProxySystem.getInstance().getFormatter()
|
||||||
// .formatUuid(proxiedPlayer.getUniqueId().toString());
|
// .formatUuid(proxiedPlayer.getUniqueId().toString());
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class RedisManager {
|
||||||
this.client = RedisClient.create(this.getConnectionUri());
|
this.client = RedisClient.create(this.getConnectionUri());
|
||||||
this.connection = client.connect();
|
this.connection = client.connect();
|
||||||
this.commands = connection.sync();
|
this.commands = connection.sync();
|
||||||
this.keyReactiveCommands = client.connect().reactive();
|
this.keyReactiveCommands = this.getConnection().reactive();
|
||||||
|
|
||||||
this.getKeyReactiveCommands().del("player");
|
this.getKeyReactiveCommands().del("player");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue