Skip to content

Commit

Permalink
make exit run plugin onEnd
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMeepso authored Dec 3, 2024
1 parent fee4fb9 commit afd1b3d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Cove/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ void Console_CancelKeyPress(object? sender, ConsoleCancelEventArgs e)
Dictionary<string, object> closePacket = new();
closePacket["type"] = "server_close";

webfishingServer.loadedPlugins.ForEach(plugin => plugin.plugin.onEnd()); // tell all plugins that the server is closing!

webfishingServer.disconnectAllPlayers();
SteamMatchmaking.LeaveLobby(webfishingServer.SteamLobby);
SteamAPI.Shutdown();
Expand Down Expand Up @@ -120,4 +122,4 @@ void Console_CancelKeyPress(object? sender, ConsoleCancelEventArgs e)
break;
}

}
}

0 comments on commit afd1b3d

Please sign in to comment.