From 324b69cba1d14f641b7f46efedaf450e9aa797b2 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 22 Feb 2012 08:32:29 -0800 Subject: [PATCH] Fixed a memory leak I didn't even know about. --- .../java/com/gmail/nossr50/listeners/mcEntityListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java index 084a21f3d..ef5944f69 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java @@ -188,6 +188,10 @@ public class mcEntityListener implements Listener Entity x = event.getEntity(); x.setFireTicks(0); + //Remove mob from mob spawner list + if(plugin.misc.mobSpawnerList.contains(x.getEntityId())) + plugin.misc.mobSpawnerList.remove(x.getEntityId()); + //Remove bleed track if(plugin.misc.bleedTracker.contains((LivingEntity)x)) plugin.misc.addToBleedRemovalQue((LivingEntity)x);