-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onShudownReceived () #370
Comments
Im pretty sure this event already exists as |
it does not seem to me that onPlayerDisconnect is triggered on server exit when the server kicks the players, but I could be wrong, I will do more testing later and report back... |
You are probably storing data in tables of your script state right? Meaning that once onShutdown has been called, you can just save these tables, the players are still in there if onPlayerDisconnect isnt called. Sure the server may kicked them already, meaning you cant send them events, but data would still be there |
yes and no, I'm trying to avoid any sort of timer, and make it as light as possible, so I don't continuously update the tables, only on disconnect, and then I was planning to also do it when the server is shut down... so that's why I made this issue... but I can find a workaround, and it's not critical... |
Is your feature request related to a problem? Please describe.
I need to store information before the server shuts down, and I need to do it before players are kicked, so that information I need to store is still available
Describe the solution you'd like
once the server receive a shutdown instruction from anywhere, as it's first step it should trigger onShudownReceived(), time needs to be given to allow information to be stored to disk etc, maybe wait for all onShudownReceived functions to return, or somehow allow them to set a delay for the rest of the shutdown?
Describe alternatives you've considered
I could use a timer to store the information every now and then, but it feels dirty, and would never be perfect
a onPreKick might also do the trick
The text was updated successfully, but these errors were encountered: