I found how to execute OS commands in lua, so I can rewritte this to execute a restart sh script on disable and make the plugin usefull, because this way you get free ram.
AutoSave&Restart v1
|
04-26-2014, 10:34 PM
Free RAM? I think you get it from here: http://www.downloadmoreram.com/
04-26-2014, 10:51 PM
The main problem with this is that the server can't really be stopped from anywhere else than its console. This hasn't been fixed, unfortunately, so even if you execute any termination commands from a plugin, the input thread will still keep the server alive (and will crash later on).
04-26-2014, 10:57 PM
Executing stop command in a plugin doesn't work?
Well, I could save-all and pkill MCServer, maybe.
04-26-2014, 11:14 PM
I haven't tested recently, but I expect it not to work. This is because there's a special thread for reading the server console input, and that thread is waiting for the input, so it cannot be stopped externally in any other way than killing it.
If you save-all and kill the server, you might cause connected players to lose their data, because those are saved only when the players disconnect.
04-26-2014, 11:16 PM
And on kick?
04-26-2014, 11:42 PM
yes, kick is a disconnect as well. if you kick the players, they will be saved.
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 5 Guest(s)