![]() |
AutoSave&Restart v1 - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Releases (https://forum.cuberite.org/forum-2.html) +--- Thread: AutoSave&Restart v1 (/thread-864.html) |
RE: AutoRestart v0 - NiLSPACE - 04-27-2013 (04-27-2013, 11:18 PM)tonibm19 Wrote: For me it's usefull, becouse sometimes server crashes after a few hours on, so I think autorestart can help. maybe it's also smart to post the crashes on the bugtracker ![]() RE: AutoRestart v0 - xoft - 04-27-2013 I don't think a self-restart would suffice for that, you'd need to shut down the server and run it again by an external tool, rather than an internal plugin. I suppose it's the same as FS #361, then it needs more data - I need the compiled MCServer binary and the core dump for that. RE: AutoSave&Restart v1 - tonibm19 - 04-28-2013 UPDATED: Now it includes autosave (MCServer has it but is not configurable). One question, is there anyway to kick all players with a message? RE: AutoSave&Restart v1 - NiLSPACE - 04-28-2013 I think you have to do ForEachPlayer in a ForEachWorld function and in there you do Player:GetClientHandle():Kick("message") RE: AutoSave&Restart v1 - tonibm19 - 04-28-2013 (04-28-2013, 04:49 AM)STR_Warrior Wrote: I think you have to do ForEachPlayer in a ForEachWorld function and in there you do Player:GetClientHandle():Kick("message")I tried with this: cRoot:Get():ForEachWorld():ForEachPlayer():Player:GetClientHandle():Kick("Server is restarting") It don't work RE: AutoSave&Restart v1 - NiLSPACE - 04-28-2013 you have to do this: local loopPlayers = function(Player) Player:GetClientHandle():Kick("Message") end local loopWorlds = function(World) World:ForEachPlayer(loopPlayers) end cRoot:Get():ForEachWorld(loopWorlds) RE: AutoSave&Restart v1 - tonibm19 - 04-28-2013 (04-28-2013, 05:01 AM)STR_Warrior Wrote: you have to do this: ![]() RE: AutoSave&Restart v1 - NiLSPACE - 04-28-2013 it took me a while to figure that trick out ![]() RE: AutoSave&Restart v1 - tonibm19 - 04-28-2013 (04-28-2013, 05:03 AM)STR_Warrior Wrote: it took me a while to figure that trick outThanks I tried it and is working very well. I think for now I can consider AutoSave&Restart done. Now I will try to make a plugin that adds command like /kill, /mute and /msg. RE: AutoSave&Restart v1 - NiLSPACE - 04-28-2013 cool ![]() ![]() |