mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-01 02:58:02 +00:00
Fix logging in
Looks like player "online" entries need to have stricter validation. I'll probably implement this with Lua.
This commit is contained in:
parent
a986481b0d
commit
b95400e810
@ -94,14 +94,14 @@ public class RedisBungeeListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String online = jedis.hget("player:" + event.getConnection().getUniqueId().toString(), "online");
|
for (String s : plugin.getServerIds()) {
|
||||||
|
if (jedis.sismember("proxy:" + s + ":usersOnline", s)) {
|
||||||
if (online != null && online.equals("0")) {
|
event.setCancelled(true);
|
||||||
event.setCancelled(true);
|
// TODO: Make it accept a BaseComponent[] like everything else.
|
||||||
// TODO: Make it accept a BaseComponent[] like everything else.
|
event.setCancelReason(TextComponent.toLegacyText(ALREADY_LOGGED_IN));
|
||||||
event.setCancelReason(TextComponent.toLegacyText(ALREADY_LOGGED_IN));
|
event.completeIntent(plugin);
|
||||||
event.completeIntent(plugin);
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, String> playerData = new HashMap<>(4);
|
Map<String, String> playerData = new HashMap<>(4);
|
||||||
|
Loading…
Reference in New Issue
Block a user