Skip to content

Commit

Permalink
Call OnServerShutdown before plugins are unloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
lukespragg committed Apr 23, 2022
1 parent e45cbc3 commit 57640d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions resources/SevenDaysToDie.opj
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
"ArgumentBehavior": 0,
"ArgumentString": null,
"HookTypeName": "Simple",
"Name": "OnServerShutdown",
"HookName": "OnServerShutdown",
"Name": "IOnServerShutdown",
"HookName": "IOnServerShutdown",
"AssemblyName": "Assembly-CSharp.dll",
"TypeName": "GameManager",
"Signature": {
Expand Down
7 changes: 4 additions & 3 deletions src/SevenDaysToDieCore.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Oxide.Core;
using Oxide.Core;
using Oxide.Core.Libraries;
using Oxide.Core.Libraries.Covalence;
using Oxide.Core.Plugins;
Expand Down Expand Up @@ -167,9 +167,10 @@ private void OnServerSave()
/// <summary>
/// Called when the server is shutting down
/// </summary>
[HookMethod("OnServerShutdown")]
private void OnServerShutdown()
[HookMethod("IOnServerShutdown")]
private void IOnServerShutdown()
{
Interface.Oxide.CallHook("OnServerShutdown");
Interface.Oxide.OnShutdown();
Covalence.PlayerManager.SavePlayerData();
}
Expand Down

0 comments on commit 57640d4

Please sign in to comment.