diff options
author | tonibm19 <tonibm19@gmail.com> | 2014-12-30 10:31:16 +0100 |
---|---|---|
committer | tonibm19 <tonibm19@gmail.com> | 2014-12-30 10:31:16 +0100 |
commit | 48b0f4daa4fe190e48b2d2652a79c3f2c14c31b5 (patch) | |
tree | d88b1822c5c5a6d1b53cbb9e03f7b3ec04ef7a27 /MCServer/webadmin | |
parent | Added player count to webadmin (diff) | |
download | cuberite-48b0f4daa4fe190e48b2d2652a79c3f2c14c31b5.tar cuberite-48b0f4daa4fe190e48b2d2652a79c3f2c14c31b5.tar.gz cuberite-48b0f4daa4fe190e48b2d2652a79c3f2c14c31b5.tar.bz2 cuberite-48b0f4daa4fe190e48b2d2652a79c3f2c14c31b5.tar.lz cuberite-48b0f4daa4fe190e48b2d2652a79c3f2c14c31b5.tar.xz cuberite-48b0f4daa4fe190e48b2d2652a79c3f2c14c31b5.tar.zst cuberite-48b0f4daa4fe190e48b2d2652a79c3f2c14c31b5.zip |
Diffstat (limited to '')
-rw-r--r-- | MCServer/webadmin/template.lua | 10 |
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) |