From 57b0e517469dfd9bfa6e621eb91d7f9cd82b982d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Tue, 10 Jun 2014 23:29:28 +0200 Subject: [PATCH] server is empty method --- application/core/Server/Server.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/application/core/Server/Server.php b/application/core/Server/Server.php index d2fea280..e0f6a718 100644 --- a/application/core/Server/Server.php +++ b/application/core/Server/Server.php @@ -415,4 +415,13 @@ class Server implements CallbackListener { public function isTeamMode() { return $this->teamMode; } + + /** + * Check if the Servers is empty + * + * @return bool + */ + public function isEmpty() { + return ($this->maniaControl->playerManager->getPlayerCount(false) === 0); + } }