Skip to content

Commit

Permalink
Merge pull request #30 from YongAn404/master
Browse files Browse the repository at this point in the history
缓存修复
  • Loading branch information
XLittleLeft authored Dec 14, 2024
2 parents dbad697 + 67497aa commit 636ba4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion HelpSense/API/API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public static class API

public static bool TryGetLog(string id, out PlayerLog log)
{
using LiteDatabase database = new(Plugin.Instance.Config.SavePath);
if (PlayerDataDic.TryGetValue(id,out log))
{
return true;
}
using LiteDatabase database = new(Plugin.Instance.Config.SavePath);
log = database.GetCollection<PlayerLog>("Players")?.FindById(id);
if (log != null)
{
Expand Down
1 change: 1 addition & 0 deletions HelpSense/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ void OnPlayerLeft(PlayerLeftEvent ev)

XHelper.PlayerList.Remove(player);
XHelper.SpecialPlayerList.Remove(player);
API.API.PlayerDataDic.Remove(player.UserId);
}

[PluginEvent]
Expand Down

0 comments on commit 636ba4d

Please sign in to comment.