for (dEntity entity : entities) {
// Call a Bukkit event for compatibility with "on entity teleports"
// world event and other plugins
if (entity.isSpawned() && entity.getEntityType() != EntityType.PLAYER)
Bukkit.getPluginManager().callEvent(new EntityTeleportEvent(entity.getBukkitEntity(), entity.getLocation(), location));
entity.spawnAt(location);
}
}