Use cRoot:Get():GetServer():GetNumPlayers() instead of a custom function.
This commit is contained in:
parent
b621fb511f
commit
48b0f4daa4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user