diff options
author | nielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-06-13 19:05:53 +0200 |
---|---|---|
committer | nielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-06-13 19:05:53 +0200 |
commit | 1e6e39f10ac39143a7641839aa9342c9c0c3fd42 (patch) | |
tree | 004512ab8bebde777852a37291f7c8c8815daa7b | |
parent | Added hopper entity, it can suck items out of chests, dispensers, droppers and other hopppers above it. (diff) | |
download | cuberite-1e6e39f10ac39143a7641839aa9342c9c0c3fd42.tar cuberite-1e6e39f10ac39143a7641839aa9342c9c0c3fd42.tar.gz cuberite-1e6e39f10ac39143a7641839aa9342c9c0c3fd42.tar.bz2 cuberite-1e6e39f10ac39143a7641839aa9342c9c0c3fd42.tar.lz cuberite-1e6e39f10ac39143a7641839aa9342c9c0c3fd42.tar.xz cuberite-1e6e39f10ac39143a7641839aa9342c9c0c3fd42.tar.zst cuberite-1e6e39f10ac39143a7641839aa9342c9c0c3fd42.zip |
Diffstat (limited to '')
-rw-r--r-- | MCServer/Plugins/Core/web_manageserver.lua | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/MCServer/Plugins/Core/web_manageserver.lua b/MCServer/Plugins/Core/web_manageserver.lua index 222736d50..4e8a9a747 100644 --- a/MCServer/Plugins/Core/web_manageserver.lua +++ b/MCServer/Plugins/Core/web_manageserver.lua @@ -6,19 +6,30 @@ function HandleRequest_ManageServer( Request ) cRoot:Get():GetPluginManager():ReloadPlugins() elseif( Request.PostParams["StopServer"] ~= nil ) then cRoot:Get():ExecuteConsoleCommand("stop") + elseif( Request.PostParams["WorldSaveAllChunks"] ~= nil ) then + cRoot:Get():GetWorld(Request.PostParams["WorldSaveAllChunks"]):SaveAllChunks() end Content = Content .. [[ - <form method="POST">]] - - Content = Content .. [[<table> - <tr style="padding-top:5px;"> - <td><input type="submit" value="Restart Server" name="RestartServer"> <br /> restart the server</td> - <td><input type="submit" value="Reload Server" name="ReloadServer"> <br /> reload the server</td> - <td><input type="submit" value="Stop Server" name="StopServer"> <br /> stop the server</td> - </tr> + <form method="POST"> + <table> + <th colspan="2">Manage Server</th> + <tr><td><input type="submit" value="Restart Server" name="RestartServer"> restart the server</td></tr> <br /> + <tr><td><input type="submit" value="Reload Server" name="ReloadServer"> reload the server</td></tr> <br /> + <tr><td><input type="submit" value="Stop Server" name="StopServer"> stop the server</td></tr> <br /> + </th> </table> - + <table> + <th colspan="2">Manage Worlds</th> ]] + local LoopWorlds = function( World ) + Content = Content .. [[ + <tr><td><input type="submit" value="]] .. World:GetName() .. [[" name="WorldSaveAllChunks"> Save all the chunks of world ]] .. World:GetName() .. [[</td></tr> <br /> + + ]] + end + cRoot:Get():ForEachWorld( LoopWorlds ) + Content = Content .. "</th></table>" + return Content end |