Fix NoSuchElementException on remove all

This commit is contained in:
aPunch 2012-03-23 07:01:55 -05:00
parent 6d95c73f5c
commit 422313c23a

View File

@ -4,6 +4,7 @@ import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.npc.CitizensNPC;
import net.citizensnpcs.npc.CitizensNPCManager;
// TODO: Move to Entity.update()?
public class NPCUpdater implements Runnable {
private final CitizensNPCManager npcManager;
@ -13,6 +14,8 @@ public class NPCUpdater implements Runnable {
@Override
public void run() {
if (!npcManager.iterator().hasNext())
return;
for (NPC npc : npcManager) {
if (!npc.isSpawned())
continue;