queue plugin fix + players array private

This commit is contained in:
kremsy 2014-07-08 21:50:32 +02:00
parent 41c19153a3
commit 7c7775e041
2 changed files with 5 additions and 1 deletions

View File

@ -41,6 +41,7 @@ class PlayerManager implements CallbackListener, TimerListener {
public $playerList = null;
public $adminLists = null;
/** @var Player[] $players */
/** @deprecated Use getPlayers() */
public $players = array();
/*

View File

@ -351,7 +351,10 @@ class QueuePlugin implements CallbackListener, ManialinkPageAnswerListener, Time
$teams = array();
/** @var Player $playerObj */
foreach ($this->maniaControl->playerManager->players as $playerObj) {
foreach ($this->maniaControl->playerManager->getPlayers() as $playerObj) {
if($playerObj->isSpectator)
continue;
if (!isset($teams[$playerObj->teamId])) {
$teams[$playerObj->teamId] = 1;
} else {