Load invite browser info at the right time
This commit is contained in:
parent
e0245b562c
commit
3f83ac642a
@ -179,14 +179,20 @@ public class CommunityManager extends MiniDbClientPlugin<CommunityMemberData>
|
||||
@Override
|
||||
public void processLoginResultSet(String playerName, UUID uuid, int accountId, ResultSet resultSet) throws SQLException
|
||||
{
|
||||
CommunityMemberData data = Get(uuid);
|
||||
while (resultSet.next())
|
||||
{
|
||||
String region = resultSet.getString("region");
|
||||
if (region.equalsIgnoreCase(_region.name()))
|
||||
{
|
||||
CommunityManager.this.Get(uuid).Invites.add(resultSet.getInt("communityId"));
|
||||
data.Invites.add(resultSet.getInt("communityId"));
|
||||
}
|
||||
}
|
||||
|
||||
if (!data.Invites.isEmpty())
|
||||
{
|
||||
loadBrowserCommunities(data.Invites, null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -929,12 +935,6 @@ public class CommunityManager extends MiniDbClientPlugin<CommunityMemberData>
|
||||
_repo.handlePlayerJoin(_loadedCommunities, load, accountId);
|
||||
System.out.println("Loaded communities: " + load + "; Total: " + _loadedCommunities.size());
|
||||
}
|
||||
|
||||
System.out.println("invites = " + data.Invites); // TODO debug
|
||||
if (!data.Invites.isEmpty())
|
||||
{
|
||||
loadBrowserCommunities(data.Invites, null);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
|
Loading…
Reference in New Issue
Block a user