File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public class LevelsRanks : BasePlugin
2525{
2626 public override string ModuleName => "[LevelsRanks] Core" ;
2727 public override string ModuleAuthor => "ABKAM designed by RoadSide Romeo & Wend4r" ;
28- public override string ModuleVersion => "v1.1.3 " ;
28+ public override string ModuleVersion => "v1.1.4 " ;
2929 public DatabaseConnection DatabaseConnection { get ; set ; } = null ! ;
3030 public Database Database { get ; set ; } = null ! ;
3131 public string ? DbConnectionString = string . Empty ;
@@ -111,8 +111,18 @@ public override void Load(bool hotReload)
111111 Task . Run ( ReauthorizeOnlinePlayers ) ;
112112
113113 RegisterEventHandlers ( ) ;
114+ RegisterListener < Listeners . OnMapEnd > ( ( ) =>
115+ {
116+ Task . Run ( async ( ) =>
117+ {
118+ foreach ( var user in OnlineUsers . Values )
119+ {
120+ await Database . UpdateUsersInDbWithRetry ( new List < User > { user } ) ;
121+ }
122+ } ) ;
123+ } ) ;
114124 }
115-
125+
116126 public override void OnAllPluginsLoaded ( bool hotReload )
117127 {
118128 _api = _pluginCapability . Get ( ) ;
You can’t perform that action at this time.
0 commit comments