PHPDoc improvements
Replaced deprecated method call
This commit is contained in:
parent
7bcd42d927
commit
6ca5decdb4
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace ManiaControl\Admin;
|
namespace ManiaControl\Admin;
|
||||||
|
|
||||||
use FML\Controls\Control;
|
|
||||||
use FML\Controls\Frame;
|
use FML\Controls\Frame;
|
||||||
use FML\Controls\Labels\Label_Button;
|
use FML\Controls\Labels\Label_Button;
|
||||||
use FML\Controls\Labels\Label_Text;
|
use FML\Controls\Labels\Label_Text;
|
||||||
|
@ -149,7 +149,7 @@ class AuthCommands implements CommandListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send usage example for //addop command
|
* Send usage example for //addmod command
|
||||||
*
|
*
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
* @return bool
|
* @return bool
|
||||||
|
@ -351,9 +351,8 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$oldSetting = $this->maniaControl->settingManager->getSettingByIndex($settingIndex);
|
$oldSetting = $this->maniaControl->settingManager->getSettingObjectByIndex($settingIndex);
|
||||||
|
if (!$oldSetting) {
|
||||||
if (!isset($oldSetting)) {
|
|
||||||
var_dump('no setting ' . $settingIndex);
|
var_dump('no setting ' . $settingIndex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,11 @@ class ServerSettings implements ConfiguratorMenu, CallbackListener {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
$this->maniaControl->client->setServerOptions($serverSettings);
|
$this->maniaControl->client->setServerOptions($serverSettings);
|
||||||
|
} catch (ServerOptionsException $exception) {
|
||||||
|
$this->maniaControl->chat->sendExceptionToAdmins($exception);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener
|
|||||||
$this->pageAnswerRegexListener[$actionIdRegex] = array();
|
$this->pageAnswerRegexListener[$actionIdRegex] = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register page answer reg exlistener
|
// Register page answer regex listener
|
||||||
array_push($this->pageAnswerRegexListener[$actionIdRegex], array($listener, $method));
|
array_push($this->pageAnswerRegexListener[$actionIdRegex], array($listener, $method));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -103,7 +103,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
|||||||
/**
|
/**
|
||||||
* Shows which map is the next
|
* Shows which map is the next
|
||||||
*
|
*
|
||||||
* @param array $chat
|
* @param array $chatCallback
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function command_ShowNextMap(array $chatCallback, Player $player) {
|
public function command_ShowNextMap(array $chatCallback, Player $player) {
|
||||||
@ -126,7 +126,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
|||||||
/**
|
/**
|
||||||
* Handle removemap command
|
* Handle removemap command
|
||||||
*
|
*
|
||||||
* @param array $chat
|
* @param array $chatCallback
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
*/
|
*/
|
||||||
public function command_RemoveMap(array $chatCallback, Player $player) {
|
public function command_RemoveMap(array $chatCallback, Player $player) {
|
||||||
|
@ -64,7 +64,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca
|
|||||||
//CallbackManager
|
//CallbackManager
|
||||||
$this->maniaControl->callbackManager->registerCallbackListener(Server::CB_TEAM_MODE_CHANGED, $this, 'teamStatusChanged');
|
$this->maniaControl->callbackManager->registerCallbackListener(Server::CB_TEAM_MODE_CHANGED, $this, 'teamStatusChanged');
|
||||||
|
|
||||||
// Action Open Playerlist
|
// Action Open PlayerList
|
||||||
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_OPEN_PLAYERLIST, $this, 'command_playerList');
|
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_OPEN_PLAYERLIST, $this, 'command_playerList');
|
||||||
$itemQuad = new Quad_UIConstruction_Buttons();
|
$itemQuad = new Quad_UIConstruction_Buttons();
|
||||||
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_Author);
|
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_Author);
|
||||||
|
@ -248,7 +248,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
|||||||
* @return Frame
|
* @return Frame
|
||||||
*/
|
*/
|
||||||
private function getPluginSettingsMenu(Frame $frame, $width, $height, Paging $paging, Player $player, $settingClass) {
|
private function getPluginSettingsMenu(Frame $frame, $width, $height, Paging $paging, Player $player, $settingClass) {
|
||||||
// TODO: use maniacontrolsettings menu
|
// TODO: use maniacontrol settings menu
|
||||||
$settings = $this->maniaControl->settingManager->getSettingsByClass($settingClass);
|
$settings = $this->maniaControl->settingManager->getSettingsByClass($settingClass);
|
||||||
|
|
||||||
$pageSettingsMaxCount = 12;
|
$pageSettingsMaxCount = 12;
|
||||||
@ -416,9 +416,8 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$oldSetting = $this->maniaControl->settingManager->getSettingByIndex($settingIndex);
|
$oldSetting = $this->maniaControl->settingManager->getSettingObjectByIndex($settingIndex);
|
||||||
|
if (!$oldSetting) {
|
||||||
if (!isset($oldSetting)) {
|
|
||||||
var_dump('no setting with index: ' . $settingIndex);
|
var_dump('no setting with index: ' . $settingIndex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -78,20 +78,21 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener,
|
|||||||
$this->registerStat(StatisticCollector::STAT_ON_CAPTURE, 60, "C");
|
$this->registerStat(StatisticCollector::STAT_ON_CAPTURE, 60, "C");
|
||||||
|
|
||||||
$this->registerStat(StatisticManager::SPECIAL_STAT_KD_RATIO, 70, "K/D", 12, StatisticManager::STAT_TYPE_FLOAT);
|
$this->registerStat(StatisticManager::SPECIAL_STAT_KD_RATIO, 70, "K/D", 12, StatisticManager::STAT_TYPE_FLOAT);
|
||||||
$this->registerStat(StatisticManager::SPECIAL_STAT_LASER_ACC, 80, "Lacc", 15, StatisticManager::STAT_TYPE_FLOAT);
|
$this->registerStat(StatisticManager::SPECIAL_STAT_LASER_ACC, 80, "LAcc", 15, StatisticManager::STAT_TYPE_FLOAT);
|
||||||
$this->registerStat(StatisticManager::SPECIAL_STAT_HITS_PH, 85, "H/h", 15, StatisticManager::STAT_TYPE_FLOAT);
|
$this->registerStat(StatisticManager::SPECIAL_STAT_HITS_PH, 85, "H/h", 15, StatisticManager::STAT_TYPE_FLOAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a Certain Stat
|
* Register a Certain Stat
|
||||||
*
|
*
|
||||||
* @param $statName
|
* @param string $statName
|
||||||
* @param $order
|
* @param int $order
|
||||||
* @param $headShortCut
|
* @param string $headShortCut
|
||||||
* @param int $width
|
* @param int $width
|
||||||
* @param string $format
|
* @param string $format
|
||||||
*/
|
*/
|
||||||
public function registerStat($statName, $order, $headShortCut, $width = 10, $format = StatisticManager::STAT_TYPE_INT) {
|
public function registerStat($statName, $order, $headShortCut, $width = 10, $format = StatisticManager::STAT_TYPE_INT) {
|
||||||
|
// TODO: use own model class
|
||||||
$this->statArray[$order] = array();
|
$this->statArray[$order] = array();
|
||||||
$this->statArray[$order]["Name"] = $statName;
|
$this->statArray[$order]["Name"] = $statName;
|
||||||
$this->statArray[$order]["HeadShortCut"] = '$o' . $headShortCut;
|
$this->statArray[$order]["HeadShortCut"] = '$o' . $headShortCut;
|
||||||
|
@ -96,7 +96,7 @@ class ChatMessagePlugin implements CommandListener, Plugin {
|
|||||||
$this->maniaControl->commandManager->registerCommandListener('afk', $this, 'chat_afk', false, 'Writes an away from keyboard message to the chat.');
|
$this->maniaControl->commandManager->registerCommandListener('afk', $this, 'chat_afk', false, 'Writes an away from keyboard message to the chat.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener(array('bm', 'bootme'), $this, 'chat_bootme', false, 'Gets you away from this server quickly!');
|
$this->maniaControl->commandManager->registerCommandListener(array('bm', 'bootme'), $this, 'chat_bootme', false, 'Gets you away from this server quickly!');
|
||||||
$this->maniaControl->commandManager->registerCommandListener(array('rq', 'ragequit'), $this, 'chat_ragequit', false, 'Gets you away from this server in rage!');
|
$this->maniaControl->commandManager->registerCommandListener(array('rq', 'ragequit'), $this, 'chat_ragequit', false, 'Gets you away from this server in rage!');
|
||||||
//TODO block commandlistener for muted people
|
//TODO block command listener for muted people
|
||||||
$this->maniaControl->settingManager->initSetting($this, self::SETTING_AFK_FORCE_SPEC, true);
|
$this->maniaControl->settingManager->initSetting($this, self::SETTING_AFK_FORCE_SPEC, true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -101,6 +101,8 @@ class ChatlogPlugin implements CallbackListener, Plugin {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Build the Log File Name and Folder
|
* Build the Log File Name and Folder
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function buildLogFileName() {
|
private function buildLogFileName() {
|
||||||
$folderName = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_FOLDERNAME);
|
$folderName = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_FOLDERNAME);
|
||||||
@ -132,6 +134,7 @@ class ChatlogPlugin implements CallbackListener, Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->fileName = $folderDir . DIRECTORY_SEPARATOR . $fileName;
|
$this->fileName = $folderDir . DIRECTORY_SEPARATOR . $fileName;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -108,7 +108,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
// Register for commands
|
// Register for commands
|
||||||
$this->maniaControl->commandManager->registerCommandListener('donate', $this, 'command_Donate', false, 'Donate some planets to the server.');
|
$this->maniaControl->commandManager->registerCommandListener('donate', $this, 'command_Donate', false, 'Donate some planets to the server.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('pay', $this, 'command_Pay', true, 'Pays planets from the server to a player.');
|
$this->maniaControl->commandManager->registerCommandListener('pay', $this, 'command_Pay', true, 'Pays planets from the server to a player.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('planets', $this, 'command_GetPlanets', true, 'Checks the planets-balance of the server.');
|
$this->maniaControl->commandManager->registerCommandListener(array('getplanets', 'planets'), $this, 'command_GetPlanets', true, 'Checks the planets-balance of the server.');
|
||||||
$this->maniaControl->commandManager->registerCommandListener('topdons', $this, 'command_TopDons', false, 'Provides an overview of who donated the most planets.');
|
$this->maniaControl->commandManager->registerCommandListener('topdons', $this, 'command_TopDons', false, 'Provides an overview of who donated the most planets.');
|
||||||
|
|
||||||
// Register for callbacks
|
// Register for callbacks
|
||||||
|
@ -44,7 +44,7 @@ class QueuePlugin implements CallbackListener, ManialinkPageAnswerListener, Time
|
|||||||
const QUEUE_WIDGET_POS_X = 'X position of the widget';
|
const QUEUE_WIDGET_POS_X = 'X position of the widget';
|
||||||
const QUEUE_WIDGET_POS_Y = 'Y position of the widget';
|
const QUEUE_WIDGET_POS_Y = 'Y position of the widget';
|
||||||
const QUEUE_ACTIVE_ON_PASS = 'Activate queue when there is a play password';
|
const QUEUE_ACTIVE_ON_PASS = 'Activate queue when there is a play password';
|
||||||
const QUEUE_CHATMESSAGES = 'Activate chatmessages on queue join/leave/move to play';
|
const QUEUE_CHATMESSAGES = 'Activate chat messages on queue join/leave/move to play';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private properties
|
* Private properties
|
||||||
@ -432,7 +432,7 @@ class QueuePlugin implements CallbackListener, ManialinkPageAnswerListener, Time
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function sends (or not depending on setting) chatmessages for the queue.
|
* Function sends (or not depending on setting) chat messages for the queue.
|
||||||
*
|
*
|
||||||
* @param string $message
|
* @param string $message
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user