Properly get online player key from redis
This commit is contained in:
parent
8e9336ad23
commit
09e711e202
@ -29,7 +29,7 @@ public class CommunityRepository extends MinecraftRepository
|
||||
private static final String GET_ALL_COMMUNITIES = "SELECT * FROM communities WHERE region=?;";
|
||||
private static final String GET_COMMUNITY_BY_ID = "SELECT * FROM communities WHERE id=?;";
|
||||
private static final String GET_COMMUNITY_BY_NAME = "SELECT * FROM communities WHERE name=? AND region=?;";
|
||||
private static final String GET_COMMUNITY_MEMBERS = "SELECT cm.accountId, cm.communityRole, ac.name, ac.uuid, ac.lastLogin, now(), cm.readingChat FROM communityMembers cm INNER JOIN accounts ac ON ac.id=cm.accountId WHERE communityId=?;";
|
||||
private static final String GET_COMMUNITY_MEMBERS = "SELECT cm.accountId, cm.communityRole, ac.name, ac.uuid, ac.lastLogin, cm.readingChat FROM communityMembers cm INNER JOIN accounts ac ON ac.id=cm.accountId WHERE communityId=?;";
|
||||
private static final String GET_COMMUNITY_JOIN_REQUESTS = "SELECT cjr.accountId, ac.name, ac.uuid FROM communityJoinRequests cjr INNER JOIN accounts ac ON ac.id=cjr.accountId WHERE communityId=?;";
|
||||
private static final String GET_COMMUNITY_SETTINGS = "SELECT settingId, settingValue FROM communitySettings WHERE communityId=?;";
|
||||
|
||||
@ -81,7 +81,7 @@ public class CommunityRepository extends MinecraftRepository
|
||||
boolean readingChat = memberSet.getBoolean("readingChat");
|
||||
|
||||
CommunityMemberInfo info = new CommunityMemberInfo(name, uuid, accountId, role, lastLogin);
|
||||
PlayerStatus status = _repo.getElement(name);
|
||||
PlayerStatus status = _repo.getElement(name.toLowerCase());
|
||||
if (status != null)
|
||||
{
|
||||
info.update(lastLogin, true, status.getServer());
|
||||
@ -152,7 +152,7 @@ public class CommunityRepository extends MinecraftRepository
|
||||
boolean readingChat = memberSet.getBoolean("readingChat");
|
||||
|
||||
CommunityMemberInfo info = new CommunityMemberInfo(name, uuid, accountId, role, lastLogin);
|
||||
PlayerStatus status = _repo.getElement(name);
|
||||
PlayerStatus status = _repo.getElement(name.toLowerCase());
|
||||
if (status != null)
|
||||
{
|
||||
info.update(lastLogin, true, status.getServer());
|
||||
@ -212,7 +212,7 @@ public class CommunityRepository extends MinecraftRepository
|
||||
{
|
||||
for (CommunityMemberInfo info : c.getMembers().values())
|
||||
{
|
||||
PlayerStatus status = _repo.getElement(info.Name);
|
||||
PlayerStatus status = _repo.getElement(info.Name.toLowerCase());
|
||||
boolean online = false;
|
||||
String server = "";
|
||||
if (status != null)
|
||||
|
Loading…
Reference in New Issue
Block a user