Clean up sewer mobs

This commit is contained in:
Sam 2017-02-18 10:36:50 +00:00
parent 074c786c35
commit 0fa0d88aac

View File

@ -1,6 +1,7 @@
package mineplex.gemhunters.world;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import org.bukkit.Bukkit;
@ -44,6 +45,17 @@ public class SewerMobs implements Listener
}
World world = Bukkit.getWorlds().get(0);
Iterator<Entity> iterator= _entities.iterator();
while (iterator.hasNext())
{
Entity entity = iterator.next();
if (entity.isDead() || !entity.isValid())
{
iterator.remove();
}
}
for (int i = 0; i < MAX_MOBS / 4; i++)
{