TBMCPlugins / ButtonServerRunner

A Java console application that controls starting/stopping the server.
GNU General Public License v3.0
0 stars 0 forks source link

Detect ingame /stop with a parameter for when to restart (stop for ...) #3

Open NorbiPeti opened 7 years ago

NorbiPeti commented 7 years ago

Using Substring on each line containing /stop check if the command is actually issued (not sent in a message or somehing like that to prevent cheating the system), and that the server is actually stopping ("stopping server" message). Restart the server after the given time, if any.

For example:

/stop 2h

This would stop the server but wouldn't exit the runner, instead it'd wait and restart 2 hours later.

Also say what's up in the console after the server stopped.