1
0

Use cRoot:Get():GetServer():GetNumPlayers() instead of a custom function.

This commit is contained in:
tonibm19 2014-12-30 10:31:16 +01:00
parent b621fb511f
commit 48b0f4daa4

View File

@ -52,21 +52,13 @@ end
function GetTotalPlayers()
Players=0
local EachPlayer = function(Player)
Players = Players + 1
end
cRoot:Get():ForEachPlayer(EachPlayer)
return Players
end
function ShowPage(WebAdmin, TemplateRequest)
SiteContent = {}
local BaseURL = WebAdmin:GetBaseURL(TemplateRequest.Request.Path)
local Title = "MCServer WebAdmin"
local NumPlayers = GetTotalPlayers()
local NumPlayers = cRoot:Get():GetServer():GetNumPlayers()
local MemoryUsageKiB = cRoot:GetPhysicalRAMUsage()
local NumChunks = cRoot:Get():GetTotalChunkCount()
local PluginPage = WebAdmin:GetPage(TemplateRequest.Request)