use of org.bukkit.entity.Ambient in project TotalFreedomMod by TotalFreedom.
the class Command_mobpurge method purgeMobs.
public static int purgeMobs() {
int removed = 0;
for (World world : Bukkit.getWorlds()) {
for (Entity ent : world.getLivingEntities()) {
if (ent instanceof Creature || ent instanceof Ghast || ent instanceof Slime || ent instanceof EnderDragon || ent instanceof Ambient) {
ent.remove();
removed++;
}
}
}
return removed;
}