summaryrefslogtreecommitdiffstats
path: root/MCServer/webadmin/template.lua
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-19 19:53:14 +0200
committerMattes D <github@xoft.cz>2015-04-19 19:53:14 +0200
commitba6f5aea4c088b92365b6636d96873a82706c8c8 (patch)
treed8c6f3a3eda7c0ed1f70bc5a01b97b90d940eab4 /MCServer/webadmin/template.lua
parentClientHandle: Fixed re-sending refused right-clicks. (diff)
parentRefresh plugin list before trying to load. (diff)
downloadcuberite-ba6f5aea4c088b92365b6636d96873a82706c8c8.tar
cuberite-ba6f5aea4c088b92365b6636d96873a82706c8c8.tar.gz
cuberite-ba6f5aea4c088b92365b6636d96873a82706c8c8.tar.bz2
cuberite-ba6f5aea4c088b92365b6636d96873a82706c8c8.tar.lz
cuberite-ba6f5aea4c088b92365b6636d96873a82706c8c8.tar.xz
cuberite-ba6f5aea4c088b92365b6636d96873a82706c8c8.tar.zst
cuberite-ba6f5aea4c088b92365b6636d96873a82706c8c8.zip
Diffstat (limited to 'MCServer/webadmin/template.lua')
-rw-r--r--MCServer/webadmin/template.lua20
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>";