1. Code:
    if (entity.ShortPrefabName.Contains("loot_barrel"))
                    entity.Kill(BaseNetworkable.DestroyMode.None);
    i am using this code inside OnEntitySpawned so it wont spawn those barrels but after i loot everything on the junkpile it is not despawning
     
  2. Cause the JunkPile holds spawngroups, which were checked being empty. Killing the objects on the endpoint does'nt make sense and has no effect, cause the spawngroup is still filled ;)