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