Skip to content

Commit

Permalink
1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ABKAM2023 authored Oct 10, 2024
1 parent 7efdba3 commit 7ed2a9d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Core/[LR] Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class LevelsRanks : BasePlugin
{
public override string ModuleName => "[LevelsRanks] Core";
public override string ModuleAuthor => "ABKAM designed by RoadSide Romeo & Wend4r";
public override string ModuleVersion => "v1.1.3";
public override string ModuleVersion => "v1.1.4";
public DatabaseConnection DatabaseConnection { get; set; } = null!;
public Database Database { get; set; } = null!;
public string? DbConnectionString = string.Empty;
Expand Down Expand Up @@ -111,8 +111,18 @@ public override void Load(bool hotReload)
Task.Run(ReauthorizeOnlinePlayers);

RegisterEventHandlers();
RegisterListener<Listeners.OnMapEnd>(() =>
{
Task.Run(async () =>
{
foreach (var user in OnlineUsers.Values)
{
await Database.UpdateUsersInDbWithRetry(new List<User> { user });
}
});
});
}

public override void OnAllPluginsLoaded(bool hotReload)
{
_api = _pluginCapability.Get();
Expand Down

0 comments on commit 7ed2a9d

Please sign in to comment.