Synchronize BrowserIds List and update the browser GUI when a contained community is disbanded
This commit is contained in:
parent
941b33bcfc
commit
cc3842f019
@ -391,7 +391,13 @@ public class CommunityManager extends MiniDbClientPlugin<CommunityMemberData>
|
||||
UtilServer.GetPlayers().stream().filter(player -> Get(player).Invites.contains(community.getId())).forEach(player -> Get(player).Invites.remove(community.getId()));
|
||||
community.getMembers().keySet().stream().filter(uuid -> Bukkit.getPlayer(uuid) != null).forEach(uuid -> Get(Bukkit.getPlayer(uuid)).leaveCommunity(community));
|
||||
_loadedCommunities.remove(community.getId());
|
||||
BrowserIds.remove(community.getId());
|
||||
runSync(() ->
|
||||
{
|
||||
if (BrowserIds.remove(community.getId()))
|
||||
{
|
||||
UtilServer.CallEvent(new CommunityBrowserUpdateEvent());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void handleToggleReadingCommunityChat(Integer id, UUID uuid, boolean reading)
|
||||
|
Loading…
Reference in New Issue
Block a user