You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In singleplayer, the player disconnecting is what triggers a shutdown, which takes place after the player has disconnected. In that case the callback is run as the player disconnects, not when the server shuts down — it's just that the server then shuts down immediately after. What the docs are trying to communicate here is just that the server shutting down doesn't itself trigger register_on_leaveplayer callbacks, and also that players being disconnected because of a server shutdown will not have the callback run for them (because the game is no longer running at that point).
Maybe it should be rephrased to something like 'Server shutdown does not trigger the callback'.
https://api.luanti.org/core-namespace-reference/
However in my experience it does get executed on shutdown. At least in singleplayer. This should be clarified or removed if entirely wrong.
The text was updated successfully, but these errors were encountered: