diff options
author | Mattes D <github@xoft.cz> | 2015-04-19 10:57:41 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-04-19 10:57:41 +0200 |
commit | a9b5a6c3a63d8500f3c512574fd802d40b562661 (patch) | |
tree | e6d0d362ed42116d6c9deaaa789287f464569514 /MCServer/webadmin/template.lua | |
parent | Merge pull request #1869 from mathias-gh/master (diff) | |
download | cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar.gz cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar.bz2 cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar.lz cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar.xz cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.tar.zst cuberite-a9b5a6c3a63d8500f3c512574fd802d40b562661.zip |
Diffstat (limited to 'MCServer/webadmin/template.lua')
-rw-r--r-- | MCServer/webadmin/template.lua | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index 6ea7b69bc..9d0f860db 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -30,20 +30,22 @@ function GetDefaultPage() Content = Content .. "<p>" .. cRoot:Get():GetServer():GetServerID() .. "</p>" Content = Content .. "<h4>Plugins:</h4><ul>" - local AllPlugins = PM:GetAllPlugins() - for key,value in pairs(AllPlugins) do - if( value ~= nil and value ~= false ) then - Content = Content .. "<li>" .. key .. " (version " .. value:GetVersion() .. ")</li>" + PM:ForEachPlugin( + function (a_CBPlugin) + if (a_CBPlugin:IsLoaded()) then + Content = Content .. "<li>" .. a_CBPlugin:GetName() .. " (version " .. a_CBPlugin:GetVersion() .. ")</li>" + end end - end + ) Content = Content .. "</ul>" Content = Content .. "<h4>Players:</h4><ul>" - local AddPlayerToTable = function( Player ) - Content = Content .. "<li>" .. Player:GetName() .. "</li>" - end - cRoot:Get():ForEachPlayer( AddPlayerToTable ) + cRoot:Get():ForEachPlayer( + function(a_CBPlayer) + Content = Content .. "<li>" .. Player:GetName() .. "</li>" + end + ) Content = Content .. "</ul><br>"; |