diff --git a/K4-System/src/Plugin/PluginDatabase.cs b/K4-System/src/Plugin/PluginDatabase.cs index 4bef73e..3231407 100644 --- a/K4-System/src/Plugin/PluginDatabase.cs +++ b/K4-System/src/Plugin/PluginDatabase.cs @@ -466,10 +466,14 @@ public async Task LoadAllPlayersCacheAsync(string combinedQuery) string steamId = row.steam_id; K4Player? k4player = K4Players.FirstOrDefault(p => p.SteamID == ulong.Parse(steamId)); - if (k4player != null && k4player.IsValid && k4player.IsPlayer) + if (k4player is null) + continue; + + Server.NextFrame(() => { - LoadPlayerRowToCache(k4player, row, true); - } + if (k4player.IsValid && k4player.IsPlayer) + LoadPlayerRowToCache(k4player, row, true); + }); } } }