mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-23 04:28:01 +00:00
Enough commits for today!
This commit is contained in:
parent
f2f84fcc13
commit
d82f375506
@ -245,10 +245,6 @@ public class RedisBungee extends Plugin implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerConnect(final PostLoginEvent event) {
|
public void onPlayerConnect(final PostLoginEvent event) {
|
||||||
getProxy().getScheduler().runAsync(this, new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (pool != null) {
|
|
||||||
Jedis rsc = pool.getResource();
|
Jedis rsc = pool.getResource();
|
||||||
try {
|
try {
|
||||||
rsc.sadd("server:" + configuration.getServerId() + ":usersOnline", event.getPlayer().getName());
|
rsc.sadd("server:" + configuration.getServerId() + ":usersOnline", event.getPlayer().getName());
|
||||||
@ -260,15 +256,9 @@ public class RedisBungee extends Plugin implements Listener {
|
|||||||
// Well, upon further inspection of BungeeCord's source code, this turned
|
// Well, upon further inspection of BungeeCord's source code, this turned
|
||||||
// out to not be needed at all, since ServerConnectedEvent is called anyway.
|
// out to not be needed at all, since ServerConnectedEvent is called anyway.
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerDisconnect(final PlayerDisconnectEvent event) {
|
public void onPlayerDisconnect(final PlayerDisconnectEvent event) {
|
||||||
getProxy().getScheduler().runAsync(this, new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (pool != null) {
|
if (pool != null) {
|
||||||
Jedis rsc = pool.getResource();
|
Jedis rsc = pool.getResource();
|
||||||
try {
|
try {
|
||||||
@ -280,14 +270,9 @@ public class RedisBungee extends Plugin implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onServerChange(final ServerConnectedEvent event) {
|
public void onServerChange(final ServerConnectedEvent event) {
|
||||||
getProxy().getScheduler().runAsync(this, new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (pool != null) {
|
if (pool != null) {
|
||||||
Jedis rsc = pool.getResource();
|
Jedis rsc = pool.getResource();
|
||||||
try {
|
try {
|
||||||
@ -297,8 +282,6 @@ public class RedisBungee extends Plugin implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPing(ProxyPingEvent event) {
|
public void onPing(ProxyPingEvent event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user