summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/webadmin/template.lua10
1 files changed, 1 insertions, 9 deletions
diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua
index 416657c4b..6ea7b69bc 100644
--- a/MCServer/webadmin/template.lua
+++ b/MCServer/webadmin/template.lua
@@ -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)