updated and improved statistic collector
This commit is contained in:
@ -14,6 +14,7 @@ use ManiaControl\ManiaControl;
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
class BasePlayerTimeStructure extends BaseTimeStructure {
|
||||
protected $login;
|
||||
|
||||
/**
|
||||
* Construct a new On Hit Structure
|
||||
@ -23,6 +24,8 @@ class BasePlayerTimeStructure extends BaseTimeStructure {
|
||||
*/
|
||||
public function __construct(ManiaControl $maniaControl, $data) {
|
||||
parent::__construct($maniaControl, $data);
|
||||
|
||||
$this->login = $this->getPlainJsonObject()->login;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -32,7 +35,17 @@ class BasePlayerTimeStructure extends BaseTimeStructure {
|
||||
* @return \ManiaControl\Players\Player
|
||||
*/
|
||||
public function getPlayer() {
|
||||
return $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->login);
|
||||
return $this->maniaControl->getPlayerManager()->getPlayer($this->login);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Login of the Player
|
||||
*
|
||||
* @api
|
||||
* @return string
|
||||
*/
|
||||
public function getLogin() {
|
||||
return $this->login;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user