Is there a message/event that gets sent on shutdown?
Is there a message/event that gets sent on shutdown?
As far as I can tell, there is no event that is fired off when you initiiate a server restart/shutdown via the console or admin panel. I want to display a warning message in the game when I initiate a server shutdown. I figured it would be cool if there was an internalevent in the server plug-in and then I'd just send a message to all attached clients that the game is shutting down when this event is fired off. Is this not possible? If not, can you add it?
Also....
Also....
I think the shutdown feature needs a bit of extras.
Firstly, is there a way to make the shutdown happen over a longer period than 10 seconds?
I think that the shutdown feature from the command line and admin console needs to do a few things:
* Specify a time for shutdown (10 seconds, 30, seconds, a minute, etc.)
* Send an admin message at a certain interval over that time period....so it will send out a message that says "the server will be shutting down in 30 seconds..." then "10 seconds" etc.
* Have an internal event for all plug-ins when the server is about to shut down. That way they can save out any info they need etc.
A lot of this can be done with the scheduling API--so I think that at the very least we need the ability to set the time interval of the shut down event through the command line and admin panel, and then a special internalevent for shutdown to do any plug-in specific processing.
I think the shutdown feature needs a bit of extras.
Firstly, is there a way to make the shutdown happen over a longer period than 10 seconds?
I think that the shutdown feature from the command line and admin console needs to do a few things:
* Specify a time for shutdown (10 seconds, 30, seconds, a minute, etc.)
* Send an admin message at a certain interval over that time period....so it will send out a message that says "the server will be shutting down in 30 seconds..." then "10 seconds" etc.
* Have an internal event for all plug-ins when the server is about to shut down. That way they can save out any info they need etc.
A lot of this can be done with the scheduling API--so I think that at the very least we need the ability to set the time interval of the shut down event through the command line and admin panel, and then a special internalevent for shutdown to do any plug-in specific processing.
- Flying_Banana
- Posts: 42
- Joined: 04 May 2014, 07:03
Re: Is there a message/event that gets sent on shutdown?
I'm also interested on whether there is a method of detecting server shutdown.
I need an entry point to perform some tasks before server shutdown, like closing database connections, saving some data, etc. Is there a workaround?
I need an entry point to perform some tasks before server shutdown, like closing database connections, saving some data, etc. Is there a workaround?
Re: Is there a message/event that gets sent on shutdown?
Hi,
all you need is adding a "shutdown hook" to the JVM so that it is executed prior to shut down.
We have discussed this already in several places.
See here:
viewtopic.php?f=18&t=16796&p=73192
cheers
all you need is adding a "shutdown hook" to the JVM so that it is executed prior to shut down.
We have discussed this already in several places.
See here:
viewtopic.php?f=18&t=16796&p=73192
cheers
Return to “Features Wish List”
Who is online
Users browsing this forum: No registered users and 20 guests