added some api / internal tags
This commit is contained in:
parent
c94c1caf4b
commit
d04a6b71fe
@ -20,6 +20,7 @@ use ManiaControl\Players\PlayerManager;
|
|||||||
/**
|
/**
|
||||||
* Class managing Actions Menus
|
* Class managing Actions Menus
|
||||||
*
|
*
|
||||||
|
* @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
|
||||||
@ -68,6 +69,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
|||||||
/**
|
/**
|
||||||
* Add a new Menu Item
|
* Add a new Menu Item
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param Control $control
|
* @param Control $control
|
||||||
* @param bool $playerAction
|
* @param bool $playerAction
|
||||||
* @param int $order
|
* @param int $order
|
||||||
@ -84,6 +86,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
|||||||
/**
|
/**
|
||||||
* Add a new Player Menu Item
|
* Add a new Player Menu Item
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param Control $control
|
* @param Control $control
|
||||||
* @param int $order
|
* @param int $order
|
||||||
* @param string $description
|
* @param string $description
|
||||||
@ -99,6 +102,8 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Build and show the menus to everyone (if a menu get made after the init)
|
* Build and show the menus to everyone (if a menu get made after the init)
|
||||||
|
*
|
||||||
|
* @api
|
||||||
*/
|
*/
|
||||||
public function rebuildAndShowMenu() {
|
public function rebuildAndShowMenu() {
|
||||||
if (!$this->initCompleted) {
|
if (!$this->initCompleted) {
|
||||||
@ -173,7 +178,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
|||||||
$popoutFrame->addChild($backgroundQuad);
|
$popoutFrame->addChild($backgroundQuad);
|
||||||
$backgroundQuad->setHorizontalAlign($backgroundQuad::RIGHT);
|
$backgroundQuad->setHorizontalAlign($backgroundQuad::RIGHT);
|
||||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||||
$backgroundQuad->setSize(count($this->adminMenuItems) * $itemSize * 1.05 + 2 , $itemSize * $itemMarginFactorY);
|
$backgroundQuad->setSize(count($this->adminMenuItems) * $itemSize * 1.05 + 2, $itemSize * $itemMarginFactorY);
|
||||||
|
|
||||||
$itemQuad->addToggleFeature($popoutFrame);
|
$itemQuad->addToggleFeature($popoutFrame);
|
||||||
|
|
||||||
@ -266,6 +271,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
|||||||
/**
|
/**
|
||||||
* Add a new Admin Menu Item
|
* Add a new Admin Menu Item
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param Control $control
|
* @param Control $control
|
||||||
* @param int $order
|
* @param int $order
|
||||||
* @param string $description
|
* @param string $description
|
||||||
@ -282,6 +288,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
|||||||
/**
|
/**
|
||||||
* Removes a Menu Item
|
* Removes a Menu Item
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param int $order
|
* @param int $order
|
||||||
* @param bool $playerAction
|
* @param bool $playerAction
|
||||||
*/
|
*/
|
||||||
@ -300,6 +307,8 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle ManiaControl AfterInit callback
|
* Handle ManiaControl AfterInit callback
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
*/
|
*/
|
||||||
public function handleAfterInit() {
|
public function handleAfterInit() {
|
||||||
$this->initCompleted = true;
|
$this->initCompleted = true;
|
||||||
@ -309,6 +318,7 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener, Usag
|
|||||||
/**
|
/**
|
||||||
* Handle PlayerJoined callback
|
* Handle PlayerJoined callback
|
||||||
*
|
*
|
||||||
|
* @internal
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function handlePlayerJoined(Player $player) {
|
public function handlePlayerJoined(Player $player) {
|
||||||
|
@ -24,6 +24,7 @@ use ManiaControl\Players\Player;
|
|||||||
/**
|
/**
|
||||||
* Widget Class listing Authorized Players
|
* Widget Class listing Authorized Players
|
||||||
*
|
*
|
||||||
|
* @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
|
||||||
@ -71,6 +72,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
|
|||||||
/**
|
/**
|
||||||
* Open Admin List Action
|
* Open Admin List Action
|
||||||
*
|
*
|
||||||
|
* @internal
|
||||||
* @param array $callback
|
* @param array $callback
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
@ -81,6 +83,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
|
|||||||
/**
|
/**
|
||||||
* Show the Admin List
|
* Show the Admin List
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function showAdminLists(Player $player) {
|
public function showAdminLists(Player $player) {
|
||||||
@ -149,9 +152,9 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
|
|||||||
}
|
}
|
||||||
|
|
||||||
$labelLine = new LabelLine($playerFrame);
|
$labelLine = new LabelLine($playerFrame);
|
||||||
$labelLine->addLabelEntryText($index, $posX + 5,13);
|
$labelLine->addLabelEntryText($index, $posX + 5, 13);
|
||||||
$labelLine->addLabelEntryText($admin->nickname,$posX + 18,52);
|
$labelLine->addLabelEntryText($admin->nickname, $posX + 18, 52);
|
||||||
$labelLine->addLabelEntryText($admin->login,$posX + 70,48);
|
$labelLine->addLabelEntryText($admin->login, $posX + 70, 48);
|
||||||
$labelLine->render();
|
$labelLine->render();
|
||||||
|
|
||||||
// Level Quad
|
// Level Quad
|
||||||
@ -212,6 +215,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
|
|||||||
/**
|
/**
|
||||||
* Called on ManialinkPageAnswer
|
* Called on ManialinkPageAnswer
|
||||||
*
|
*
|
||||||
|
* @internal
|
||||||
* @param array $callback
|
* @param array $callback
|
||||||
*/
|
*/
|
||||||
public function handleManialinkPageAnswer(array $callback) {
|
public function handleManialinkPageAnswer(array $callback) {
|
||||||
@ -235,6 +239,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
|
|||||||
/**
|
/**
|
||||||
* Reopen the widget on Map Begin, MapListChanged, etc.
|
* Reopen the widget on Map Begin, MapListChanged, etc.
|
||||||
*
|
*
|
||||||
|
* @internal
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function updateWidget(Player $player) {
|
public function updateWidget(Player $player) {
|
||||||
@ -253,6 +258,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
|
|||||||
/**
|
/**
|
||||||
* Closes the widget
|
* Closes the widget
|
||||||
*
|
*
|
||||||
|
* @internal
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function closeWidget(Player $player) {
|
public function closeWidget(Player $player) {
|
||||||
@ -262,6 +268,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener, Usage
|
|||||||
/**
|
/**
|
||||||
* Unset the player if he opened another Main Widget
|
* Unset the player if he opened another Main Widget
|
||||||
*
|
*
|
||||||
|
* @internal
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
* @param string $openedWidget
|
* @param string $openedWidget
|
||||||
*/
|
*/
|
||||||
|
@ -43,6 +43,7 @@ class AuthCommands implements CommandListener, UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Handle //addsuperadmin command
|
* Handle //addsuperadmin command
|
||||||
*
|
*
|
||||||
|
* @internal
|
||||||
* @param array $chatCallback
|
* @param array $chatCallback
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
@ -85,6 +86,7 @@ class AuthCommands implements CommandListener, UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Handle //addadmin command
|
* Handle //addadmin command
|
||||||
*
|
*
|
||||||
|
* @internal
|
||||||
* @param array $chatCallback
|
* @param array $chatCallback
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
@ -127,6 +129,7 @@ class AuthCommands implements CommandListener, UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Handle //addmod command
|
* Handle //addmod command
|
||||||
*
|
*
|
||||||
|
* @internal
|
||||||
* @param array $chatCallback
|
* @param array $chatCallback
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
@ -170,6 +173,7 @@ class AuthCommands implements CommandListener, UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Handle //removerights command
|
* Handle //removerights command
|
||||||
*
|
*
|
||||||
|
* @internal
|
||||||
* @param array $chatCallback
|
* @param array $chatCallback
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
|
@ -19,6 +19,7 @@ use ManiaControl\Settings\Setting;
|
|||||||
/**
|
/**
|
||||||
* Class managing Authentication Levels
|
* Class managing Authentication Levels
|
||||||
*
|
*
|
||||||
|
* @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
|
||||||
@ -117,6 +118,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
/**
|
/**
|
||||||
* Get Name of the Authentication Level from Level Int
|
* Get Name of the Authentication Level from Level Int
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param mixed $authLevelInt
|
* @param mixed $authLevelInt
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -138,6 +140,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
/**
|
/**
|
||||||
* Get the Authentication Level Int from the given Param
|
* Get the Authentication Level Int from the given Param
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param mixed $authLevelParam
|
* @param mixed $authLevelParam
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@ -154,6 +157,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
/**
|
/**
|
||||||
* Get Authentication Level Int from Level Name
|
* Get Authentication Level Int from Level Name
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param string $authLevelName
|
* @param string $authLevelName
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@ -175,6 +179,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
/**
|
/**
|
||||||
* Get the Abbreviation of the Authentication Level from Level Int
|
* Get the Abbreviation of the Authentication Level from Level Int
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param mixed $authLevelInt
|
* @param mixed $authLevelInt
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@ -195,6 +200,8 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle ManiaControl OnInit Callback
|
* Handle ManiaControl OnInit Callback
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
*/
|
*/
|
||||||
public function handleOnInit() {
|
public function handleOnInit() {
|
||||||
$this->updateMasterAdmins();
|
$this->updateMasterAdmins();
|
||||||
@ -265,6 +272,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
/**
|
/**
|
||||||
* Get all connected Players with at least the given Auth Level
|
* Get all connected Players with at least the given Auth Level
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param int $authLevel
|
* @param int $authLevel
|
||||||
* @return Player[]
|
* @return Player[]
|
||||||
*/
|
*/
|
||||||
@ -282,6 +290,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
/**
|
/**
|
||||||
* Check whether the Player has enough Rights
|
* Check whether the Player has enough Rights
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
* @param int|Setting $neededAuthLevel
|
* @param int|Setting $neededAuthLevel
|
||||||
* @return bool
|
* @return bool
|
||||||
@ -296,6 +305,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
/**
|
/**
|
||||||
* Get a List of all Admins
|
* Get a List of all Admins
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param int $authLevel
|
* @param int $authLevel
|
||||||
* @return Player[]
|
* @return Player[]
|
||||||
*/
|
*/
|
||||||
@ -323,6 +333,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
/**
|
/**
|
||||||
* Grant the Auth Level to the Player
|
* Grant the Auth Level to the Player
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
* @param int $authLevel
|
* @param int $authLevel
|
||||||
* @return bool
|
* @return bool
|
||||||
@ -368,6 +379,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
/**
|
/**
|
||||||
* Send an Error Message to the Player
|
* Send an Error Message to the Player
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
@ -381,6 +393,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
/**
|
/**
|
||||||
* Checks the permission by a right name
|
* Checks the permission by a right name
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
* @param $rightName
|
* @param $rightName
|
||||||
* @return bool
|
* @return bool
|
||||||
@ -393,6 +406,7 @@ class AuthenticationManager implements CallbackListener, EchoListener, Communica
|
|||||||
/**
|
/**
|
||||||
* Define a Minimum Right Level needed for an Action
|
* Define a Minimum Right Level needed for an Action
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param string $rightName
|
* @param string $rightName
|
||||||
* @param int $authLevelNeeded
|
* @param int $authLevelNeeded
|
||||||
*/
|
*/
|
||||||
|
@ -7,6 +7,7 @@ use ManiaControl\Players\Player;
|
|||||||
/**
|
/**
|
||||||
* ManiaControl BillData Structure
|
* ManiaControl BillData Structure
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||||
* @copyright 2014-2015 ManiaControl Team
|
* @copyright 2014-2015 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 BillData {
|
|||||||
/**
|
/**
|
||||||
* Construct new Bill Data Model
|
* Construct new Bill Data Model
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param string $class
|
* @param string $class
|
||||||
* @param callable $function
|
* @param callable $function
|
||||||
* @param Player|string $player
|
* @param Player|string $player
|
||||||
|
@ -14,6 +14,7 @@ use Maniaplanet\DedicatedServer\Structures\Bill;
|
|||||||
/**
|
/**
|
||||||
* ManiaControl Bill Manager Class
|
* ManiaControl Bill Manager Class
|
||||||
*
|
*
|
||||||
|
* @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
|
||||||
@ -54,6 +55,7 @@ class BillManager implements CallbackListener, UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Send a bill to a player
|
* Send a bill to a player
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param callable $function
|
* @param callable $function
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
* @param int $amount
|
* @param int $amount
|
||||||
@ -80,6 +82,7 @@ class BillManager implements CallbackListener, UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Send planets from the server to a player
|
* Send planets from the server to a player
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param callable $function
|
* @param callable $function
|
||||||
* @param string $receiverLogin
|
* @param string $receiverLogin
|
||||||
* @param int $amount
|
* @param int $amount
|
||||||
@ -104,13 +107,14 @@ class BillManager implements CallbackListener, UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Handle bill updated callback
|
* Handle bill updated callback
|
||||||
*
|
*
|
||||||
|
* @internal
|
||||||
* @param array $callback
|
* @param array $callback
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function handleBillUpdated(array $callback) {
|
public function handleBillUpdated(array $callback) {
|
||||||
$billId = $callback[1][0];
|
$billId = $callback[1][0];
|
||||||
if (!isset($this->openBills[$billId])) {
|
if (!isset($this->openBills[$billId])) {
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
$billData = $this->openBills[$billId];
|
$billData = $this->openBills[$billId];
|
||||||
|
|
||||||
@ -142,5 +146,6 @@ class BillManager implements CallbackListener, UsageInformationAble {
|
|||||||
unset($this->openBills[$billId]);
|
unset($this->openBills[$billId]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user