1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

Fix connected_players on_shutdown (#14739)

This commit is contained in:
cx384
2024-06-15 16:00:33 +02:00
committed by GitHub
parent bc23a610d3
commit 7a64527db5
4 changed files with 46 additions and 25 deletions

View File

@@ -5720,6 +5720,8 @@ Call these functions only at load time!
aliases handled.
* `minetest.register_on_shutdown(function())`
* Called before server shutdown
* Players that were kicked by the shutdown procedure are still fully accessible
in `minetest.get_connected_players()`.
* **Warning**: If the server terminates abnormally (i.e. crashes), the
registered callbacks **will likely not be run**. Data should be saved at
semi-frequent intervals as well as on server shutdown.