diff --git a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisUtil.java b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisUtil.java index c867a24..b85b747 100644 --- a/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisUtil.java +++ b/src/main/java/com/imaginarycode/minecraft/redisbungee/RedisUtil.java @@ -37,12 +37,9 @@ public class RedisUtil { } } - // Compatibility restraints prevent me from using using HDEL with multiple keys. public static void cleanUpPlayer(String player, Jedis rsc) { rsc.srem("proxy:" + RedisBungee.getApi().getServerId() + ":usersOnline", player); - rsc.hdel("player:" + player, "server"); - rsc.hdel("player:" + player, "ip"); - rsc.hdel("player:" + player, "proxy"); + rsc.hdel("player:" + player, "server", "ip", "proxy"); long timestamp = System.currentTimeMillis(); rsc.hset("player:" + player, "online", String.valueOf(timestamp)); rsc.publish("redisbungee-data", RedisBungee.getGson().toJson(new DataManager.DataManagerMessage<>( @@ -52,9 +49,7 @@ public class RedisUtil { public static void cleanUpPlayer(String player, Pipeline rsc) { rsc.srem("proxy:" + RedisBungee.getApi().getServerId() + ":usersOnline", player); - rsc.hdel("player:" + player, "server"); - rsc.hdel("player:" + player, "ip"); - rsc.hdel("player:" + player, "proxy"); + rsc.hdel("player:" + player, "server", "ip", "proxy"); long timestamp = System.currentTimeMillis(); rsc.hset("player:" + player, "online", String.valueOf(timestamp)); rsc.publish("redisbungee-data", RedisBungee.getGson().toJson(new DataManager.DataManagerMessage<>(