summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
authortonibm19 <tonibm19@gmail.com>2014-12-30 10:31:16 +0100
committertonibm19 <tonibm19@gmail.com>2014-12-30 10:31:16 +0100
commit48b0f4daa4fe190e48b2d2652a79c3f2c14c31b5 (patch)
treed88b1822c5c5a6d1b53cbb9e03f7b3ec04ef7a27 /MCServer
parentAdded player count to webadmin (diff)
downloadcuberite-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 '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)