57 lines
1.2 KiB
PHP
57 lines
1.2 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace ManiaControl\Callbacks\Structures\TrackMania;
|
||
|
|
||
|
|
||
|
use ManiaControl\Callbacks\Structures\BaseStructure;
|
||
|
use ManiaControl\ManiaControl;
|
||
|
|
||
|
/**
|
||
|
* Structure Class for the OnCommand Structure Callback
|
||
|
*
|
||
|
* @author ManiaControl Team <mail@maniacontrol.com>
|
||
|
* @copyright 2014-2017 ManiaControl Team
|
||
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||
|
*/
|
||
|
class OnCommandStructure extends BaseStructure {
|
||
|
public $time;
|
||
|
public $name;
|
||
|
public $value;
|
||
|
|
||
|
public function __construct(ManiaControl $maniaControl, $data) {
|
||
|
parent::__construct($maniaControl, $data);
|
||
|
|
||
|
$this->time = $this->getPlainJsonObject()->time;
|
||
|
$this->name = $this->getPlainJsonObject()->name;
|
||
|
$this->value = $this->getPlainJsonObject()->value;
|
||
|
}
|
||
|
|
||
|
/** Dumps the Object with some Information */
|
||
|
public function dump() {
|
||
|
parent::dump();
|
||
|
var_dump("With getShooter() you get a Player Object");
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return int
|
||
|
*/
|
||
|
public function getTime() {
|
||
|
return $this->time;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return mixed
|
||
|
*/
|
||
|
public function getName() {
|
||
|
return $this->name;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return \ManiaControl\Players\Player
|
||
|
*/
|
||
|
public function getValue() {
|
||
|
return $this->value;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|