capturestructure fix
This commit is contained in:
parent
0aa539b00d
commit
a26c25e980
@ -3,12 +3,16 @@
|
||||
namespace ManiaControl\Callbacks\Structures;
|
||||
|
||||
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Players\Player;
|
||||
|
||||
class CaptureStructure {
|
||||
private $playerArray;
|
||||
/** @var ManiaControl $maniaControl */
|
||||
private $maniaControl;
|
||||
|
||||
public function __construct($maniaControl, $data) {
|
||||
public function __construct(ManiaControl $maniaControl, $data) {
|
||||
$this->maniaControl = $maniaControl;
|
||||
$this->playerArray = $data;
|
||||
}
|
||||
|
||||
@ -23,7 +27,10 @@ class CaptureStructure {
|
||||
* @return Player[]
|
||||
*/
|
||||
public function getPlayerArray() {
|
||||
//TODO build array with player objects
|
||||
return $this->playerArray;
|
||||
$playerArray = array();
|
||||
foreach ($this->playerArray as $login) {
|
||||
$playerArray[$login] = $this->maniaControl->getPlayerManager()->getPlayer($this->playerArray);
|
||||
}
|
||||
return $playerArray;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user