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'; 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 /** Joust Selected Players
* *
* @deprecated * @deprecated

View File

@ -68,6 +68,7 @@ class ShootManiaCallbacks implements CallbackListener {
/** /**
* Handle Script Callbacks * Handle Script Callbacks
* *
* @internal
* @param string $name * @param string $name
* @param mixed $data * @param mixed $data
*/ */
@ -166,15 +167,6 @@ class ShootManiaCallbacks implements CallbackListener {
case 'WarmUp_Status': case 'WarmUp_Status':
$this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::WARMUPSTATUS, $data[0]); $this->maniaControl->getCallbackManager()->triggerCallback(Callbacks::WARMUPSTATUS, $data[0]);
break; 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: case self::CB_TIMEATTACK_ONCHECKPOINT:
$this->handleTimeAttackOnCheckpoint($name, $data); $this->handleTimeAttackOnCheckpoint($name, $data);
break; break;

View File

@ -1,31 +1,40 @@
<?php <?php
/**
* Created by PhpStorm.
* User: Lukas
* Date: 07. Apr. 2017
* Time: 17:56
*/
namespace ManiaControl\Callbacks\Structures\Common; namespace ManiaControl\Callbacks\Structures\Common;
use ManiaControl\ManiaControl; 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 { class BaseResponseStructure extends BaseStructure {
protected $responseId; 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 * Get the Response Id
* *
* @api
* @return string * @return string
*/ */
public function getResponseId() { public function getResponseId() {
return $this->responseId; 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 * Base Structure of all Callback Structures
* *
* @api
* @author ManiaControl Team <mail@maniacontrol.com> * @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014-2017 ManiaControl Team * @copyright 2014-2017 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
@ -23,6 +24,12 @@ abstract class BaseStructure implements UsageInformationAble, JsonSerializable {
protected $maniaControl; protected $maniaControl;
private $plainJsonObject; private $plainJsonObject;
/**
* BaseStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
protected function __construct(ManiaControl $maniaControl, $data) { protected function __construct(ManiaControl $maniaControl, $data) {
$this->maniaControl = $maniaControl; $this->maniaControl = $maniaControl;
$this->plainJsonObject = json_decode($data[0]); $this->plainJsonObject = json_decode($data[0]);
@ -30,6 +37,8 @@ abstract class BaseStructure implements UsageInformationAble, JsonSerializable {
/** /**
* Gets the Plain Json * Gets the Plain Json
*
* @api
*/ */
public function getPlainJsonObject() { public function getPlainJsonObject() {
return $this->plainJsonObject; return $this->plainJsonObject;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -16,6 +16,12 @@ use ManiaControl\ManiaControl;
*/ */
class OnScoresStructure extends CommonScoresStructure { class OnScoresStructure extends CommonScoresStructure {
/**
* OnScoresStructure constructor.
*
* @param \ManiaControl\ManiaControl $maniaControl
* @param $data
*/
public function __construct(ManiaControl $maniaControl, $data) { public function __construct(ManiaControl $maniaControl, $data) {
parent::__construct($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;
}