Changing Shut Down Message?

I was wondering where I could change the message
“The server has closed”

Uhh where do I put that :worried:

I think you are looking for a plugin to do this, right?

I could use it, but I thought it would be somewhere in Sponge to change like Spigot had

He is looking for a plugin or Sponge config option, not wondering how to code a plugin.

Also, your code will immediately shutdown the server before it even starts.

Ah sorry i think he want to code a plugin because it’s the wrong category.
Move your topic to Plugin

He is not really in the wrong category since he hope we can solve his problem with sponge and not necessarily a plugin

2 Likes

I could make you a fast little plugin with no configuration and no commands that just overrides the default shutdown message. What message would you like to have on the screen?

“Server is restarting, please re-login in about 1 minute”

Although a config for other people might be useful

I’ll add a small config file. Would you like it to just override the /stop command or would you like the ability to create commands like /restart that would broadcast a message, /shutdown would broadcast another, /brb would tell you would be back in 1h and so on? You would be able to create commands through the config file and could give admins permissions plugin.stop, plugin.restart,… , plugin.all?

I use multicraft for the scheduled restarts, but i’m not sure how it shuts down the server so probably running it for any type of shutdown would be fine, you could add those commands if you do a public release but I think having just the message is fine enough for me :smile:

Here you go. No configuration needed. All you have to do is fire /restart [optional message]. The default message is set to your request.

EDIT: I may have misunderstood your request. Are you able to launch a command before the scheduled restart?

No it only does /restart I can’t change it, but your plugin does work except I can’t use it properly :cry:

Edit: It also looks like it may be doing /stop then /start once its fully stopped

I added support for the “/stop” command. If this one is triggered the plugin would override the default stop message. Works on servers when fired by the console. Could you download the latest (v1.0.1) and try it out?

It could be very help-full if you managed to know how the server restart works (with which command it’s ran). This could be found in the log iirc.

It does this
"[22:23:00] [Server thread/INFO]: [EssentialCmds]: [Server] executed command stop "

Did you try the latest plugin version?

Not yet, I need to wait until the evening when most users are off to work on it