2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2026-04-08 16:10:26 +00:00

check if player is really on the proxy when connecting

this prevents logged in error if somehow proxy shutdowns at weird time
This commit is contained in:
2024-06-18 00:55:12 +04:00
parent d8704c8a8f
commit 69e91c3e42
3 changed files with 34 additions and 14 deletions

View File

@@ -82,6 +82,13 @@ public abstract class ProxyDataManager implements Runnable {
return getProxyMembers(proxyId);
}
// this skip checking if proxy is and its package private
// due proxy shutdown shenanigans
public boolean isPlayerTrulyOnProxy(String proxyId, UUID uuid) {
return unifiedJedis.sismember("redisbungee::" + this.networkId + "::proxies::" + proxyId + "::online-players", uuid.toString());
}
public List<String> proxiesIds() {
return Collections.list(this.heartbeats.keys());
}