From 6ab08020c3191120c3eb610a97f36f524d7adaef Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Fri, 11 Jan 2013 14:19:02 +0100 Subject: [PATCH] Online players broadcast when >= 2 players. fixes #48 --- src/classes/PocketMinecraftServer.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classes/PocketMinecraftServer.class.php b/src/classes/PocketMinecraftServer.class.php index 6797a3e5ec..63adbf58c5 100644 --- a/src/classes/PocketMinecraftServer.class.php +++ b/src/classes/PocketMinecraftServer.class.php @@ -102,7 +102,7 @@ class PocketMinecraftServer{ $this->action(1000000 * 60, '$this->reloadConfig();'); $this->action(1000000 * 60 * 10, '$this->custom = array();'); if($this->api !== false){ - $this->action(1000000 * 80, '$this->chat(false, "Online (".count($this->clients)."): ".implode(", ",$this->api->player->online()));'); + $this->action(1000000 * 80, '$cnt = count($this->clients); if($cnt > 1){$this->chat(false, "Online (".$cnt."): ".implode(", ",$this->api->player->online()));}'); } $this->action(1000000 * 120, '$this->debugInfo(true);'); }