mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-06 10:50:22 +01:00
21 lines
487 B
Java
21 lines
487 B
Java
package net.citizensnpcs;
|
|
|
|
import net.citizensnpcs.api.npc.NPC;
|
|
import net.citizensnpcs.npc.CitizensNPCManager;
|
|
|
|
public class NPCUpdater implements Runnable {
|
|
private final CitizensNPCManager npcManager;
|
|
|
|
public NPCUpdater(CitizensNPCManager npcManager) {
|
|
this.npcManager = npcManager;
|
|
}
|
|
|
|
@Override
|
|
public void run() {
|
|
for (NPC npc : npcManager) {
|
|
if (!npc.isSpawned())
|
|
continue;
|
|
npc.update();
|
|
}
|
|
}
|
|
} |