doc update

This commit is contained in:
kremsy 2017-04-07 23:26:35 +02:00
parent 782d8b50e8
commit fa4c16e659
47 changed files with 360 additions and 183 deletions

View File

@ -313,17 +313,6 @@ interface Callbacks {
*/
const ONPLAYERREQUESTRESPAWN = 'Callbacks.OnPlayerRequestRespawn';
/** Elite OnBeginTurn Callback: EliteBeginTurnStructure
*
* @deprecated
*/
const ELITE_ONBEGINTURN = "Callbacks.EliteOnBeginTurn";
/** Elite OnEndTurn Callback: integer (VictoryTypes)
*
* @deprecated
*/
const ELITE_ONENDTURN = "Callbacks.EliteOnEndTurn";
/** Joust Selected Players
*
* @deprecated

View File

@ -68,6 +68,7 @@ class ShootManiaCallbacks implements CallbackListener {
/**
* Handle Script Callbacks
*
* @internal
* @param string $name
* @param mixed $data
*/
@ -166,15 +167,6 @@ class ShootManiaCallbacks implements CallbackListener {
case 'WarmUp_Status':
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::WARMUPSTATUS, $data[0]);
break;
case 'Elite_BeginTurn':
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::ELITE_ONBEGINTURN, new EliteBeginTurnStructure($this->maniaControl, $data));
break;
case 'Elite_EndTurn':
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::ELITE_ONENDTURN, $data[0]);
break;
case 'Joust_SelectedPlayers':
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::JOUST_SELECTEDPLAYERS, $data);
break;
case self::CB_TIMEATTACK_ONCHECKPOINT:
$this->handleTimeAttackOnCheckpoint($name, $data);
break;

View File

@ -1,31 +1,40 @@
<?php
/**
* Created by PhpStorm.
* User: Lukas
* Date: 07. Apr. 2017
* Time: 17:56
*/
namespace ManiaControl\Callbacks\Structures\Common;
use ManiaControl\ManiaControl;
/**
* Base Structure Class for all Callbacks using a Response Id
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class BaseResponseStructure extends BaseStructure {
protected $responseId;
/**
* BaseResponseStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
$this->responseId = $this->getPlainJsonObject()->responseid;
}
/**
* Get the Response Id
*
* @api
* @return string
*/
public function getResponseId() {
return $this->responseId;
}
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
$this->responseId = $this->getPlainJsonObject()->responseid;
}
}

View File

@ -12,6 +12,7 @@ use ManiaControl\ManiaControl;
/**
* Base Structure of all Callback Structures
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -23,6 +24,12 @@ abstract class BaseStructure implements UsageInformationAble, JsonSerializable {
protected $maniaControl;
private $plainJsonObject;
/**
* BaseStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
protected function __construct(ManiaControl $maniaControl, $data) {
$this->maniaControl = $maniaControl;
$this->plainJsonObject = json_decode($data[0]);
@ -30,6 +37,8 @@ abstract class BaseStructure implements UsageInformationAble, JsonSerializable {
/**
* Gets the Plain Json
*
* @api
*/
public function getPlainJsonObject() {
return $this->plainJsonObject;

View File

@ -12,6 +12,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnScores Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -24,7 +25,12 @@ class CommonScoresStructure extends BaseResponseStructure {
protected $teamScores = array();
protected $playerScores = array();
//TODO test
/**
* CommonScoresStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -56,6 +62,7 @@ class CommonScoresStructure extends BaseResponseStructure {
/**
* Get the Winner Player Object
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getWinnerPlayer() {
@ -65,6 +72,7 @@ class CommonScoresStructure extends BaseResponseStructure {
/**
* < Current progress of the match. Can be "" | "EndRound" | "EndMap" | "EndMatch"
*
* @api
* @return string
*/
public function getSection() {
@ -74,6 +82,7 @@ class CommonScoresStructure extends BaseResponseStructure {
/**
* Returns if the GameMode uses Teams or not
*
* @api
* @return boolean
*/
public function getUseTeams() {
@ -83,6 +92,7 @@ class CommonScoresStructure extends BaseResponseStructure {
/**
* Get the Winner Team Id
*
* @api
* @return int
*/
public function getWinnerTeamId() {
@ -92,6 +102,7 @@ class CommonScoresStructure extends BaseResponseStructure {
/**
* Returns the TeamScores
*
* @api
* @return TeamScore[]
*/
public function getTeamScores() {
@ -101,6 +112,7 @@ class CommonScoresStructure extends BaseResponseStructure {
/**
* Get the Player Scores
*
* @api
* @return CommonPlayerScore[]
*/
public function getPlayerScores() {

View File

@ -12,6 +12,7 @@ use ManiaControl\Players\Player;
/**
* Common PlayerStructure Model
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -27,6 +28,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable {
/**
* Returns the Player
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getPlayer() {
@ -34,6 +36,9 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable {
}
/**
* Returns the Player
*
* @api
* @param \ManiaControl\Players\Player $player
*/
public function setPlayer(Player $player) {
@ -43,6 +48,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable {
/**
* Returns the Rank
*
* @api
* @return int
*/
public function getRank() {
@ -52,6 +58,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable {
/**
* Sets the Rank
*
* @api
* @param int $rank
*/
public function setRank($rank) {
@ -61,6 +68,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable {
/**
* Gets the Round Points
*
* @api
* @return int
*/
public function getRoundPoints() {
@ -70,6 +78,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable {
/**
* Sets the RoundPoints
*
* @api
* @param int $roundPoints
*/
public function setRoundPoints($roundPoints) {
@ -79,6 +88,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable {
/**
* Gets the Map Points
*
* @api
* @return int
*/
public function getMapPoints() {
@ -88,6 +98,7 @@ class CommonPlayerScore implements UsageInformationAble, JsonSerializable {
/**
* Sets the Map Points
*
* @api
* @param int $mapPoints
*/
public function setMapPoints($mapPoints) {

View File

@ -10,6 +10,7 @@ use ManiaControl\General\UsageInformationTrait;
/**
* TeamScore Model
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -24,6 +25,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable {
private $matchPoints;
/**
* Get the Team Id
*
* @api
* @return mixed
*/
public function getTeamId() {
@ -31,6 +35,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable {
}
/**
* Sets the TeamId
*
* @api
* @param mixed $id
*/
public function setTeamId($id) {
@ -38,13 +45,19 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable {
}
/**
* @return mixed
* Gets the Name
*
* @api
* @return string
*/
public function getName() {
return $this->name;
}
/**
* Sets the Name
*
* @api
* @param mixed $name
*/
public function setName($name) {
@ -52,6 +65,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable {
}
/**
* Gets the Round Points
*
* @api
* @return mixed
*/
public function getRoundPoints() {
@ -59,6 +75,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable {
}
/**
* Sets the Round Points
*
* @api
* @param mixed $roundPoints
*/
public function setRoundPoints($roundPoints) {
@ -66,6 +85,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable {
}
/**
* Gets the Map Points
*
* @api
* @return mixed
*/
public function getMapPoints() {
@ -73,6 +95,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable {
}
/**
* Sets the Mappoints
*
* @api
* @param mixed $mapPoints
*/
public function setMapPoints($mapPoints) {
@ -80,6 +105,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable {
}
/**
* Gets the Matchpoints
*
* @api
* @return mixed
*/
public function getMatchPoints() {
@ -87,6 +115,9 @@ class CommonTeamScore implements UsageInformationAble, JsonSerializable {
}
/**
* Sets the Match Points
*
* @api
* @param mixed $matchPoints
*/
public function setMatchPoints($matchPoints) {

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the StatusCallback Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -31,6 +32,7 @@ class StatusCallbackStructure extends BaseResponseStructure {
/**
* True if the Status (Like Combo Pause or Warmup) is Ongoing
*
* @api
* @return boolean
*/
public function getActive() {

View File

@ -1,59 +0,0 @@
<?php
namespace ManiaControl\Callbacks\Structures;
use ManiaControl\ManiaControl;
use ManiaControl\Players\Player;
/**
* Structure Class for the EliteBeginTurn 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 EliteBeginTurnStructure {
/*
* Private properties
*/
private $attackerLogin;
private $defenderLogins;
/** @var ManiaControl $maniaControl */
private $maniaControl;
/**
* Construct a new Elite BeginTurnStructure
*
* @param ManiaControl $maniaControl
* @param array $data
*/
public function __construct(ManiaControl $maniaControl, array $data) {
$this->maniaControl = $maniaControl;
$this->attackerLogin = $data[0];
$this->defenderLogins = $data[1];
}
/**
* Get the attacker
*
* @return Player
*/
public function getAttacker() {
return $this->maniaControl->getPlayerManager()->getPlayer($this->attackerLogin);
}
/**
* Get the defenders as an Player Array
*
* @return Player[]
*/
public function getDefenders() {
$defenders = array();
foreach (explode(";", $this->defenderLogins) as $defenderLogin) {
$defenders[] = $this->maniaControl->getPlayerManager()->getPlayer($defenderLogin);
}
return $defenders;
}
}

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the Default Start End Callbacks
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -16,6 +17,12 @@ use ManiaControl\ManiaControl;
class StartEndStructure extends BaseStructure {
private $count;
/**
* StartEndStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -25,6 +32,7 @@ class StartEndStructure extends BaseStructure {
/**
* Get the Count of this Section
*
* @api
* @return int
*/
public function getCount() {

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the Default Start Server Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -16,6 +17,12 @@ use ManiaControl\ManiaControl;
class StartServerStructure extends BaseStructure {
private $restarted;
/**
* StartServerStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -25,6 +32,7 @@ class StartServerStructure extends BaseStructure {
/**
* Flag if the Server got Restarted
*
* @api
* @return mixed
*/
public function getRestarted() {

View File

@ -9,6 +9,7 @@ use ManiaControl\General\UsageInformationTrait;
/**
* Landmark Model
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -22,6 +23,7 @@ class Landmark implements UsageInformationAble {
private $position = null;
/**
* @api
* @return string
*/
public function getTag() {
@ -29,6 +31,7 @@ class Landmark implements UsageInformationAble {
}
/**
* @api
* @param string $tag
*/
public function setTag($tag) {
@ -36,6 +39,7 @@ class Landmark implements UsageInformationAble {
}
/**
* @api
* @return mixed
*/
public function getOrder() {
@ -43,6 +47,7 @@ class Landmark implements UsageInformationAble {
}
/**
* @api
* @param mixed $order
*/
public function setOrder($order) {
@ -50,6 +55,7 @@ class Landmark implements UsageInformationAble {
}
/**
* @api
* @return mixed
*/
public function getId() {
@ -57,6 +63,7 @@ class Landmark implements UsageInformationAble {
}
/**
* @api
* @param mixed $id
*/
public function setId($id) {
@ -64,6 +71,7 @@ class Landmark implements UsageInformationAble {
}
/**
* @api
* @return \ManiaControl\Callbacks\Structures\ShootMania\Models\Position
*/
public function getPosition() {
@ -71,6 +79,7 @@ class Landmark implements UsageInformationAble {
}
/**
* @api
* @param \ManiaControl\Callbacks\Structures\ShootMania\Models\Position $position
*/
public function setPosition(Position $position) {

View File

@ -8,6 +8,7 @@ use ManiaControl\Callbacks\Structures\Common\Models\CommonPlayerScore;
/**
* PlayerScore Model
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3

View File

@ -9,6 +9,7 @@ use ManiaControl\General\UsageInformationTrait;
/**
* Position Model
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -21,6 +22,7 @@ class Position implements UsageInformationAble {
private $z = 0;
/**
* @api
* @return int
*/
public function getX() {
@ -28,6 +30,7 @@ class Position implements UsageInformationAble {
}
/**
* @api
* @param int $x
*/
public function setX($x) {
@ -35,6 +38,7 @@ class Position implements UsageInformationAble {
}
/**
* @api
* @return int
*/
public function getZ() {
@ -42,6 +46,7 @@ class Position implements UsageInformationAble {
}
/**
* @api
* @param int $z
*/
public function setZ($z) {
@ -49,6 +54,7 @@ class Position implements UsageInformationAble {
}
/**
* @api
* @return int
*/
public function getY() {
@ -56,6 +62,7 @@ class Position implements UsageInformationAble {
}
/**
* @api
* @param int $y
*/
public function setY($y) {

View File

@ -7,6 +7,7 @@ use ManiaControl\Callbacks\Structures\Common\Models\CommonTeamScore;
/**
* Shootmania TeamScore Model
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3

View File

@ -5,6 +5,7 @@ namespace ManiaControl\Callbacks\Structures\ShootMania\Models;
/**
* Weapons Interface
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnCustomEvent Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -21,6 +22,12 @@ class OnActionCustomEventStructure extends BaseStructure {
private $param1;
private $param2 = array();
/**
* OnActionCustomEventStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -37,6 +44,7 @@ class OnActionCustomEventStructure extends BaseStructure {
/**
* Returns Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -46,6 +54,7 @@ class OnActionCustomEventStructure extends BaseStructure {
/**
* < Id of the action that triggered the event
*
* @api
* @return string
*/
public function getActionId() {
@ -55,6 +64,7 @@ class OnActionCustomEventStructure extends BaseStructure {
/**
* < Login of the player who shot if any
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getShooter() {
@ -64,6 +74,7 @@ class OnActionCustomEventStructure extends BaseStructure {
/**
* < player who got hit if any
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getVictim() {
@ -73,6 +84,7 @@ class OnActionCustomEventStructure extends BaseStructure {
/**
* < First custom param of the event
*
* @api
* @return string
*/
public function getParam1() {
@ -82,6 +94,7 @@ class OnActionCustomEventStructure extends BaseStructure {
/**
* < Second custom param of the event
*
* @api
* @return array
*/
public function getParam2() {

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnCustomEvent Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -18,6 +19,12 @@ class OnActionEvent extends BaseStructure {
private $player;
private $actionInput;
/**
* OnActionEvent constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -30,6 +37,7 @@ class OnActionEvent extends BaseStructure {
/**
* Returns Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -39,6 +47,7 @@ class OnActionEvent extends BaseStructure {
/**
* < player who triggered the action
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getPlayer() {
@ -48,11 +57,10 @@ class OnActionEvent extends BaseStructure {
/**
* < The input pressed to trigger the action
*
* @api
* @return string
*/
public function getActionInput() {
return $this->actionInput;
}
}

View File

@ -5,6 +5,7 @@ namespace ManiaControl\Callbacks\Structures\ShootMania;
/**
* Structure Class for the OnArmorEmpty Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3

View File

@ -12,6 +12,7 @@ use ManiaControl\Players\Player;
/**
* Structure Class for the OnCapture Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -23,6 +24,12 @@ class OnCaptureStructure extends BaseStructure {
private $playerArray = array();
/**
* OnCaptureStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -47,6 +54,7 @@ class OnCaptureStructure extends BaseStructure {
/**
* Get the logins as Array
*
* @api
* @return string[]
*/
public function getLoginArray() {
@ -56,6 +64,7 @@ class OnCaptureStructure extends BaseStructure {
/**
* Get the Players as Player Array
*
* @api
* @return Player[]
*/
public function getPlayerArray() {
@ -72,6 +81,7 @@ class OnCaptureStructure extends BaseStructure {
/**
* Returns Information about the Captured Landmark
*
* @api
* @return \ManiaControl\Callbacks\Structures\ShootMania\Models\LandMark
*/
public function getLandMark() {

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnCommand Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -29,6 +30,7 @@ class OnCommandStructure extends BaseStructure {
/**
* < Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -38,6 +40,7 @@ class OnCommandStructure extends BaseStructure {
/**
* < Name of the command
*
* @api
* @return string
*/
public function getName() {
@ -51,6 +54,7 @@ class OnCommandStructure extends BaseStructure {
* "real": 123.456,
* "text": "an example value"
*
* @api
* @return mixed
*/
public function getValue() {

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the Default Event Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -17,6 +18,12 @@ class OnDefaultEventStructure extends BaseStructure {
private $time;
private $type;
/**
* OnDefaultEventStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -27,6 +34,7 @@ class OnDefaultEventStructure extends BaseStructure {
/**
* Returns Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -36,6 +44,7 @@ class OnDefaultEventStructure extends BaseStructure {
/**
* Returns the type of event
*
* @api
* @return string
*/
public function getType() {

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnEliteEndTurn Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnEliteStartTurn Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -32,6 +33,7 @@ class OnEliteStartTurnStructure extends BaseStructure {
}
/**
* @api
* @return \ManiaControl\Players\Player
*/
public function getAttacker() {
@ -41,6 +43,7 @@ class OnEliteStartTurnStructure extends BaseStructure {
/**
* Returns a Login Array of the defenders
*
* @api
* @return array
*/
public function getDefenderLogins() {
@ -50,6 +53,7 @@ class OnEliteStartTurnStructure extends BaseStructure {
/**
* Gets an Array of the Players
*
* @api
* @return \ManiaControl\Players\Player[]
*/
public function getDefenders() {

View File

@ -10,6 +10,7 @@ use ManiaControl\Players\Player;
/**
* Structure Class for the OnFallDamage Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -21,6 +22,12 @@ class OnFallDamageStructure extends BaseStructure {
*/
private $victim;
/**
* OnFallDamageStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -31,6 +38,7 @@ class OnFallDamageStructure extends BaseStructure {
/**
* < Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -40,6 +48,7 @@ class OnFallDamageStructure extends BaseStructure {
/**
* < Player who fell
*
* @api
* @return Player
*/
public function getVictim() {

View File

@ -12,6 +12,7 @@ use ManiaControl\Players\Player;
/**
* Structure Base Class for the OnHit/OnNearMiss/OnArmorEmpty Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -59,6 +60,7 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure {
/**
* < Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -68,6 +70,7 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure {
/**
* < Id of the weapon [1-Laser, 2-Rocket, 3-Nucleus, 5-Arrow]
*
* @api
* @see \ManiaControl\Callbacks\Structures\ShootMania\Models\Weapons
* @return int
*/
@ -78,6 +81,7 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure {
/**
* < Position of the Shooter at the time
*
* @api
* @return Position
*/
public function getShooterPosition() {
@ -87,6 +91,7 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure {
/**
* < Position of the Victim at the time
*
* @api
* @return \ManiaControl\Callbacks\Structures\ShootMania\Models\Position
*/
public function getVictimPosition() {
@ -96,6 +101,7 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure {
/**
* < Shooter Player
*
* @api
* @return Player
*/
public function getShooter() {
@ -105,12 +111,10 @@ class OnHitNearMissArmorEmptyBaseStructure extends BaseStructure {
/**
* < Victim Player
*
* @api
* @return Player
*/
public function getVictim() {
return $this->victim;
}
}

View File

@ -8,6 +8,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnHit Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -16,6 +17,12 @@ class OnHitStructure extends OnHitNearMissArmorEmptyBaseStructure {
private $damage;
/**
* OnHitStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param array $data
*/
public function __construct(ManiaControl $maniaControl, array $data) {
parent::__construct($maniaControl, $data);
@ -25,6 +32,7 @@ class OnHitStructure extends OnHitNearMissArmorEmptyBaseStructure {
/**
* < Amount of Damage done by the hit (only on onHit)
*
* @api
* @return int
*/
public function getDamage() {

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnJoustReload Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnJoustSelectedPlayers Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -32,6 +33,7 @@ class OnJoustSelectedPlayersStructure extends BaseStructure {
/**
* Returns a Login Array of the Players
*
* @api
* @return array
*/
public function getPlayerLogins() {
@ -41,6 +43,7 @@ class OnJoustSelectedPlayersStructure extends BaseStructure {
/**
* Gets an Array of the Players
*
* @api
* @return \ManiaControl\Players\Player[]
*/
public function getPlayers() {

View File

@ -8,6 +8,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnNearMiss Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -24,6 +25,8 @@ class OnNearMissStructure extends OnHitNearMissArmorEmptyBaseStructure {
/**
* Returns the distance
*
*
* @api
* @return float
*/
public function getDistance() {

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnPlayerTouchesObject Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -20,6 +21,12 @@ class OnPlayerObjectStructure extends BaseStructure {
private $modelId;
private $modelName;
/**
* OnPlayerObjectStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -34,6 +41,7 @@ class OnPlayerObjectStructure extends BaseStructure {
/**
* Returns Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -43,6 +51,7 @@ class OnPlayerObjectStructure extends BaseStructure {
/**
* < Login of the player who touched the object
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getPlayer() {
@ -52,6 +61,7 @@ class OnPlayerObjectStructure extends BaseStructure {
/**
* < The id of the object
*
* @api
* @return string
*/
public function getObjectId() {
@ -61,6 +71,7 @@ class OnPlayerObjectStructure extends BaseStructure {
/**
* < The id of the object model
*
* @api
* @return string
*/
public function getModelId() {
@ -70,11 +81,10 @@ class OnPlayerObjectStructure extends BaseStructure {
/**
* < The name of the object model
*
* @api
* @return string
*/
public function getModelName() {
return $this->modelName;
}
}

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnPlayerRequestActionChange Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -18,6 +19,12 @@ class OnPlayerRequestActionChange extends BaseStructure {
private $player;
private $actionChange;
/**
* OnPlayerRequestActionChange constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -30,6 +37,7 @@ class OnPlayerRequestActionChange extends BaseStructure {
/**
* Returns Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -39,6 +47,7 @@ class OnPlayerRequestActionChange extends BaseStructure {
/**
* < player who requested a new action
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getPlayer() {
@ -48,11 +57,10 @@ class OnPlayerRequestActionChange extends BaseStructure {
/**
* < Can be -1 (request previous action) or 1 (request next action)
*
* @api
* @return string
*/
public function getActionChange() {
return $this->actionChange;
}
}

View File

@ -10,6 +10,7 @@ use ManiaControl\Players\Player;
/**
* Structure Class for the OnPlayerRequestRespawnStructure Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -21,6 +22,12 @@ class OnPlayerRequestRespawnStructure extends BaseStructure {
*/
private $player;
/**
* OnPlayerRequestRespawnStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -32,6 +39,7 @@ class OnPlayerRequestRespawnStructure extends BaseStructure {
/**
* Returns the Time the Event Happened
*
* @api
* @return int
*/
public function getTime() {
@ -41,6 +49,7 @@ class OnPlayerRequestRespawnStructure extends BaseStructure {
/**
* Gets the Player
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getPlayer() {

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnPlayerTriggersSector Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -18,7 +19,12 @@ class OnPlayerTriggersSectorStructure extends BaseStructure {
private $player;
private $sectorId;
/**
* OnPlayerTriggersSectorStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -31,6 +37,7 @@ class OnPlayerTriggersSectorStructure extends BaseStructure {
/**
* Returns Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -40,6 +47,7 @@ class OnPlayerTriggersSectorStructure extends BaseStructure {
/**
* < player who touched the object
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getPlayer() {
@ -49,6 +57,7 @@ class OnPlayerTriggersSectorStructure extends BaseStructure {
/**
* < Id of the triggered sector
*
* @api
* @return string
*/
public function getSectorId() {

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnRoyalPoints Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -56,6 +57,7 @@ class OnRoyalPointsStructure extends BaseStructure {
/**
* Gets the number of points scored
*
* @api
* @return int
*/
public function getPoints() {

View File

@ -11,13 +11,19 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the Shootmania OnScores Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class OnScoresStructure extends CommonScoresStructure {
/**
* OnScoresStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);

View File

@ -10,6 +10,7 @@ use ManiaControl\Players\Player;
/**
* Structure Class for the OnShoot Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3

View File

@ -10,6 +10,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the OnShotDeny Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -43,6 +44,7 @@ class OnShotDenyStructure extends BaseStructure {
/**
* ServerTime The Event Happened //TODO add Trait for the Time Property
*
* @api
* @return int
*/
public function getTime() {
@ -53,6 +55,7 @@ class OnShotDenyStructure extends BaseStructure {
/**
* Gets the Shooter Player
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getShooter() {
@ -62,6 +65,7 @@ class OnShotDenyStructure extends BaseStructure {
/**
* Gets the Victim Player
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getVictim() {
@ -69,7 +73,11 @@ class OnShotDenyStructure extends BaseStructure {
}
/**
* @return mixed
* Gets the Shooter Weapon
*
* @api
* @see \ManiaControl\Callbacks\Structures\ShootMania\Models\Weapons
* @return int Weapon
*/
public function getShooterWeapon() {
return $this->shooterWeapon;
@ -78,6 +86,7 @@ class OnShotDenyStructure extends BaseStructure {
/**
* Get the Victim Weapon
*
* @api
* @see \ManiaControl\Callbacks\Structures\ShootMania\Models\Weapons
* @return int
*/

View File

@ -4,11 +4,12 @@ namespace ManiaControl\Callbacks\Structures\TrackMania\Models;
use ManiaControl\Callbacks\Structures\Common\Models\CommonPlayerScore;
use ManiaControl\Players\Player;
//TODO proper return descriptions on getter methods -> use autogenerate for setter/getter + docs
/**
* PlayerScore Model
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -26,6 +27,7 @@ class PlayerScore extends CommonPlayerScore {
/**
* Returns the Rank
*
* @api
* @return int
*/
public function getRank() {
@ -35,6 +37,7 @@ class PlayerScore extends CommonPlayerScore {
/**
* Sets the Rank
*
* @api
* @param int $rank
*/
public function setRank($rank) {
@ -42,35 +45,38 @@ class PlayerScore extends CommonPlayerScore {
}
/**
* Gets the bestRaceTime
*
* @param int $bestraceTime
*/
public function getBestraceTime(){
* Gets the bestRaceTime
*
* @api
* @param int $bestraceTime
*/
public function getBestraceTime() {
return $this->bestRaceTime;
}
/**
* Gets the bestlapTime
*
* @param int $bestlapTime
*/
public function getBestlapTime(){
* Gets the bestlapTime
*
* @api
* @param int $bestlapTime
*/
public function getBestlapTime() {
return $this->bestLapTime;
}
/**
* Gets the StuntScore
*
* @param int $bestraceTime
*/
public function getStuntScore(){
* Gets the StuntScore
*
* @api
* @param int $bestraceTime
*/
public function getStuntScore() {
return $this->stuntScore;
}
/**
* @api
* @param mixed $bestRaceTime
*/
public function setBestRaceTime($bestRaceTime) {
@ -78,6 +84,7 @@ class PlayerScore extends CommonPlayerScore {
}
/**
* @api
* @param mixed $bestLapTime
*/
public function setBestLapTime($bestLapTime) {
@ -85,6 +92,7 @@ class PlayerScore extends CommonPlayerScore {
}
/**
* @api
* @param mixed $stuntScore
*/
public function setStuntScore($stuntScore) {
@ -92,6 +100,7 @@ class PlayerScore extends CommonPlayerScore {
}
/**
* @api
* @return mixed
*/
public function getBestRaceRespawns() {
@ -99,6 +108,7 @@ class PlayerScore extends CommonPlayerScore {
}
/**
* @api
* @param mixed $bestRaceRespawns
*/
public function setBestRaceRespawns($bestRaceRespawns) {
@ -106,6 +116,7 @@ class PlayerScore extends CommonPlayerScore {
}
/**
* @api
* @return mixed
*/
public function getBestRaceCheckpoints() {
@ -113,6 +124,7 @@ class PlayerScore extends CommonPlayerScore {
}
/**
* @api
* @param mixed $bestRaceCheckpoints
*/
public function setBestRaceCheckpoints($bestRaceCheckpoints) {
@ -120,6 +132,7 @@ class PlayerScore extends CommonPlayerScore {
}
/**
* @api
* @return mixed
*/
public function getBestLapRespawns() {
@ -134,6 +147,7 @@ class PlayerScore extends CommonPlayerScore {
}
/**
* @api
* @return mixed
*/
public function getBestLapCheckpoints() {
@ -141,6 +155,7 @@ class PlayerScore extends CommonPlayerScore {
}
/**
* @api
* @param mixed $bestLapCheckpoints
*/
public function setBestLapCheckpoints($bestLapCheckpoints) {

View File

@ -7,6 +7,7 @@ use ManiaControl\Callbacks\Structures\Common\Models\CommonTeamScore;
/**
* Shootmania TeamScore Model
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3

View File

@ -5,10 +5,11 @@ namespace ManiaControl\Callbacks\Structures\TrackMania;
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
use ManiaControl\ManiaControl;
//TODO make a common structure between shootmania and this and extend it
/**
* Structure Class for the OnCommand Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -18,6 +19,12 @@ class OnCommandStructure extends BaseStructure {
private $name;
private $value;
/**
* OnCommandStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
@ -29,6 +36,7 @@ class OnCommandStructure extends BaseStructure {
/**
* < Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -38,6 +46,7 @@ class OnCommandStructure extends BaseStructure {
/**
* < Name of the command
*
* @api
* @return string
*/
public function getName() {
@ -51,6 +60,7 @@ class OnCommandStructure extends BaseStructure {
* "real": 123.456,
* "text": "an example value"
*
* @api
* @return mixed
*/
public function getValue() {

View File

@ -17,6 +17,12 @@ class OnDefaultEventStructure extends BaseStructure {
private $time;
private $type;
/**
* OnDefaultEventStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);

View File

@ -9,6 +9,7 @@ use ManiaControl\ManiaControl;
/**
* Structure Class for the EventStartLine Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -20,13 +21,14 @@ class OnEventStartLineStructure extends BaseStructure {
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
$this->time = $this->getPlainJsonObject()->time;
$this->time = $this->getPlainJsonObject()->time;
$this->player = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->login);
}
/**
* Returns Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -34,10 +36,11 @@ class OnEventStartLineStructure extends BaseStructure {
}
/**
* < player who triggered the action
*
* @return \ManiaControl\Players\Player
*/
* < player who triggered the action
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getPlayer() {
return $this->player;
}

View File

@ -3,14 +3,15 @@
namespace ManiaControl\Callbacks\Structures\TrackMania;
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
use ManiaControl\Callbacks\Models\RecordCallback;
use ManiaControl\Callbacks\Structures\Common\BaseStructure;
use ManiaControl\ManiaControl;
use ManiaControl\Utils\Formatter;
/**
* Structure Class for the Default Event Structure Callback
*
* @api
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -29,21 +30,27 @@ class OnEventWayPointStructure extends BaseStructure {
private $speed;
private $distance;
/**
* OnEventWayPointStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);
$this->time = $this->getPlainJsonObject()->time;
$this->player = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->login);
$this->racetime = (int) $this->getPlainJsonObject()->racetime;
$this->laptime = (int) $this->getPlainJsonObject()->laptime;
$this->stuntsscore = $this->getPlainJsonObject()->stuntsscore;
$this->time = $this->getPlainJsonObject()->time;
$this->player = $this->maniaControl->getPlayerManager()->getPlayer($this->getPlainJsonObject()->login);
$this->racetime = (int) $this->getPlainJsonObject()->racetime;
$this->laptime = (int) $this->getPlainJsonObject()->laptime;
$this->stuntsscore = $this->getPlainJsonObject()->stuntsscore;
$this->checkpointinrace = (int) $this->getPlainJsonObject()->checkpointinrace;
$this->checkpointinlap = (int) $this->getPlainJsonObject()->checkpointinlap;
$this->isendrace = $this->getPlainJsonObject()->isendrace;
$this->isendlap = $this->getPlainJsonObject()->isendlap;
$this->blockid = $this->getPlainJsonObject()->blockid;
$this->speed = $this->getPlainJsonObject()->speed;
$this->distance = $this->getPlainJsonObject()->distance;
$this->checkpointinlap = (int) $this->getPlainJsonObject()->checkpointinlap;
$this->isendrace = $this->getPlainJsonObject()->isendrace;
$this->isendlap = $this->getPlainJsonObject()->isendlap;
$this->blockid = $this->getPlainJsonObject()->blockid;
$this->speed = $this->getPlainJsonObject()->speed;
$this->distance = $this->getPlainJsonObject()->distance;
// Build callback
$wayPointCallback = new RecordCallback();
@ -74,6 +81,7 @@ class OnEventWayPointStructure extends BaseStructure {
/**
* Returns Server time when the event occured
*
* @api
* @return int
*/
public function getTime() {
@ -81,10 +89,11 @@ class OnEventWayPointStructure extends BaseStructure {
}
/**
* < player who triggered the action
*
* @return \ManiaControl\Players\Player
*/
* < player who triggered the action
*
* @api
* @return \ManiaControl\Players\Player
*/
public function getPlayer() {
return $this->player;
}

View File

@ -16,6 +16,12 @@ use ManiaControl\ManiaControl;
*/
class OnScoresStructure extends CommonScoresStructure {
/**
* OnScoresStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($maniaControl, $data);

View File

@ -1,18 +0,0 @@
<?php
namespace ManiaControl\Callbacks\Structures;
/**
* VictoryTypes Interface (only available in Elite atm)
*
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
* @deprecated see ManiaControl\Callbacks\Structures\ShootMania\Models\VictoryTypes
*/
interface VictoryTypes {
const TIME_LIMIT = 1;
const CAPTURE = 2;
const ATTACKER_ELIMINATED = 3;
const DEFENDERS_ELIMINATED = 4;
}

View File

@ -1,18 +0,0 @@
<?php
namespace ManiaControl\Callbacks\Structures;
/**
* Weapons Interface
*
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
* @deprecated use ShootMania/Models/Weapons instead
*/
interface Weapons {
const LASER = 1;
const ROCKET = 2;
const NUCLEUS = 3;
const ARROW = 5;
}