From 55c54eeff4dc72619fc9be1bb724b9dd37804919 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 17 Jan 2016 20:11:25 +1100 Subject: [PATCH] Fix ServerMonitor not actually removing ServerGroup instances. --- .../src/mineplex/servermonitor/ServerMonitor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java index cb57dc313..2bb711a58 100644 --- a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java +++ b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java @@ -206,7 +206,7 @@ public class ServerMonitor if (groupStatus.getServerType().equalsIgnoreCase("Player")) { _repository.removeServerGroup(groupStatus); - _serverGroupMap.remove(groupStatus); + _serverGroupMap.remove(groupStatus.getName()); groupStatusIterator.remove(); System.out.println("Removed MPS : " + groupStatus.getName()); @@ -449,7 +449,7 @@ public class ServerMonitor if (serverGroup != null && serverGroup.getHost() != null && !serverGroup.getHost().isEmpty() && serverGroup.getServerCount() <= 1) { _repository.removeServerGroup(serverGroup); - _serverGroupMap.remove(serverGroup); + _serverGroupMap.remove(serverGroup.getName()); _serverGroups.remove(serverGroup); System.out.println("Removed ServerGroup : " + serverGroup.getName()); }