using System.Linq; namespace Oxide.Plugins { [Info("Photofix", "Death", "1.0.2")] class Photofix : RustPlugin { void OnServerInitialized() { var photoEntityList = Facepunch.Pool.GetList(); photoEntityList.AddRange(BaseNetworkable.serverEntities.OfType()); foreach (var photoEntity in photoEntityList) { var imageData = FileStorage.server.Get(photoEntity.ImageCrc, FileStorage.Type.jpg, photoEntity.net.ID, 0); if (imageData == null) { Puts($"Image data is null for {photoEntity.net.ID}. Destroying..."); photoEntity.Kill(); } } Facepunch.Pool.FreeList(ref photoEntityList); } } }