mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-23 04:28:01 +00:00
fuck the clone detection, it doesn't work very well
This commit is contained in:
parent
1bf6d98d54
commit
adf61b7b8d
@ -302,23 +302,6 @@ public final class RedisBungee extends Plugin implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void onPreLogin(PreLoginEvent event) {
|
|
||||||
if (pool != null) {
|
|
||||||
Jedis rsc = pool.getResource();
|
|
||||||
try {
|
|
||||||
for (String server : configuration.getLinkedServers()) {
|
|
||||||
if (rsc.sismember("server:" + server + ":usersOnline", event.getConnection().getName())) {
|
|
||||||
event.setCancelled(true);
|
|
||||||
event.setCancelReason("You are already logged on to this server.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} finally {
|
|
||||||
pool.returnResource(rsc);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerConnect(final PostLoginEvent event) {
|
public void onPlayerConnect(final PostLoginEvent event) {
|
||||||
if (pool != null) {
|
if (pool != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user