From 66bfcc9d9b65bbc7a48ae1bebf366571599813d2 Mon Sep 17 00:00:00 2001 From: Dan Mulloy Date: Thu, 14 Jun 2018 21:04:44 -0400 Subject: [PATCH] Remove disbanded communities from the browser --- .../src/mineplex/core/communities/CommunityManager.java | 1 + .../core/communities/gui/buttons/CommunityBrowserButton.java | 3 +-- .../core/communities/gui/pages/CommunityBrowserPage.java | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/CommunityManager.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/CommunityManager.java index 2b351f800..19e809f08 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/CommunityManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/CommunityManager.java @@ -619,6 +619,7 @@ public class CommunityManager extends MiniDbClientPlugin public void handleCommunityDisband(Integer id, String senderName) { + _browserCommunities.remove(id); Community community = _loadedCommunities.get(id); if (community == null) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/gui/buttons/CommunityBrowserButton.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/gui/buttons/CommunityBrowserButton.java index 836a02e6d..c94eb548b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/gui/buttons/CommunityBrowserButton.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/gui/buttons/CommunityBrowserButton.java @@ -15,8 +15,7 @@ public class CommunityBrowserButton extends CommunitiesGUIButton { private ICommunity _community; private Player _viewer; - - @SuppressWarnings("deprecation") + public CommunityBrowserButton(Player viewer, ICommunity community) { super(createButton(community)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/communities/gui/pages/CommunityBrowserPage.java b/Plugins/Mineplex.Core/src/mineplex/core/communities/gui/pages/CommunityBrowserPage.java index 40ca2f400..05bbceeeb 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/communities/gui/pages/CommunityBrowserPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/communities/gui/pages/CommunityBrowserPage.java @@ -24,7 +24,6 @@ public class CommunityBrowserPage extends CommunitiesGUIPage private int _page = 1; private boolean _loading = false; - private boolean _update = false; private List _displaying = new ArrayList<>(); @@ -40,7 +39,6 @@ public class CommunityBrowserPage extends CommunitiesGUIPage { if (_loading) { - _update = true; return; }