mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-23 04:28:01 +00:00
Revert vemacs for the 3rd time.
@vemacs, do not change this, or I will not only revoke your access to the repo, I will also skin you alive. Using "API" methods in this context is just fine and just because it doesn't suit your fancy doesn't mean you can just change it. I am the BDFL, obey me.
This commit is contained in:
parent
2cdc844b75
commit
1d99367956
@ -57,7 +57,7 @@ public final class RedisBungee extends Plugin {
|
||||
@Getter
|
||||
private static Gson gson = new Gson();
|
||||
@Getter
|
||||
private static String serverId;
|
||||
private String serverId;
|
||||
|
||||
private static RedisBungeeAPI api;
|
||||
private static PubSubListener psl = null;
|
||||
|
@ -46,7 +46,7 @@ public class RedisBungeeConsumer implements Runnable {
|
||||
private void handle(ConsumerEvent event, Jedis jedis) {
|
||||
if (event instanceof PlayerLoggedInConsumerEvent) {
|
||||
PlayerLoggedInConsumerEvent event1 = (PlayerLoggedInConsumerEvent) event;
|
||||
jedis.sadd("server:" + RedisBungee.getServerId() + ":usersOnline", event1.getPlayer().getUniqueId().toString());
|
||||
jedis.sadd("server:" + RedisBungee.getApi().getServerId() + ":usersOnline", event1.getPlayer().getUniqueId().toString());
|
||||
jedis.hset("player:" + event1.getPlayer().getUniqueId().toString(), "online", "0");
|
||||
jedis.hset("player:" + event1.getPlayer().getUniqueId().toString(), "ip", event1.getPlayer().getAddress().getAddress().getHostAddress());
|
||||
jedis.hset("player:" + event1.getPlayer().getUniqueId().toString(), "name", event1.getPlayer().getName());
|
||||
|
@ -10,7 +10,7 @@ import redis.clients.jedis.Jedis;
|
||||
|
||||
public class RedisUtil {
|
||||
public static void cleanUpPlayer(String player, Jedis rsc) {
|
||||
rsc.srem("server:" + RedisBungee.getServerId() + ":usersOnline", player);
|
||||
rsc.srem("server:" + RedisBungee.getApi().getServerId() + ":usersOnline", player);
|
||||
rsc.hdel("player:" + player, "server");
|
||||
rsc.hdel("player:" + player, "ip");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user