changed direct public property access to using getter methods
phpdoc improvements
This commit is contained in:
		| @@ -34,15 +34,16 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener { | |||||||
| 	const ACTION_OPEN_PLAYER_MENU = 'ActionsMenu.OpenPlayerMenu'; | 	const ACTION_OPEN_PLAYER_MENU = 'ActionsMenu.OpenPlayerMenu'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $adminMenuItems = array(); | 	private $adminMenuItems = array(); | ||||||
| 	private $playerMenuItems = array(); | 	private $playerMenuItems = array(); | ||||||
| 	private $initCompleted = false; | 	private $initCompleted = false; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Create a new Actions Menu | 	 * Construct a new Actions Menu instance | ||||||
| 	 * | 	 * | ||||||
| 	 * @param ManiaControl $maniaControl | 	 * @param ManiaControl $maniaControl | ||||||
| 	 */ | 	 */ | ||||||
| @@ -116,9 +117,9 @@ class ActionsMenu implements CallbackListener, ManialinkPageAnswerListener { | |||||||
| 		$posX              = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MENU_POSX); | 		$posX              = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MENU_POSX); | ||||||
| 		$posY              = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MENU_POSY); | 		$posY              = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MENU_POSY); | ||||||
| 		$itemSize          = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MENU_ITEMSIZE); | 		$itemSize          = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MENU_ITEMSIZE); | ||||||
| 		$shootManiaOffset  = $this->maniaControl->manialinkManager->styleManager->getDefaultIconOffsetSM(); | 		$shootManiaOffset  = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultIconOffsetSM(); | ||||||
| 		$quadStyle         = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle(); | 		$quadStyle         = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadStyle(); | ||||||
| 		$quadSubstyle      = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle(); | 		$quadSubstyle      = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadSubstyle(); | ||||||
| 		$itemMarginFactorX = 1.3; | 		$itemMarginFactorX = 1.3; | ||||||
| 		$itemMarginFactorY = 1.2; | 		$itemMarginFactorY = 1.2; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -76,8 +76,8 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 	public function showAdminLists(Player $player) { | 	public function showAdminLists(Player $player) { | ||||||
| 		$this->adminListShown[$player->login] = true; | 		$this->adminListShown[$player->login] = true; | ||||||
|  |  | ||||||
| 		$width  = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width  = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$height = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
|  |  | ||||||
| 		// get Admins | 		// get Admins | ||||||
| 		$admins = $this->maniaControl->authenticationManager->getAdmins(); | 		$admins = $this->maniaControl->authenticationManager->getAdmins(); | ||||||
| @@ -89,7 +89,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 		$script->addFeature($paging); | 		$script->addFeature($paging); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| 		$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script, $paging); | 		$frame = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultListFrame($script, $paging); | ||||||
| 		$maniaLink->add($frame); | 		$maniaLink->add($frame); | ||||||
|  |  | ||||||
| 		// Start offsets | 		// Start offsets | ||||||
| @@ -97,7 +97,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 		$posY = $height / 2; | 		$posY = $height / 2; | ||||||
|  |  | ||||||
| 		//Predefine description Label | 		//Predefine description Label | ||||||
| 		$descriptionLabel = $this->maniaControl->manialinkManager->styleManager->getDefaultDescriptionLabel(); | 		$descriptionLabel = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultDescriptionLabel(); | ||||||
| 		$frame->add($descriptionLabel); | 		$frame->add($descriptionLabel); | ||||||
|  |  | ||||||
| 		// Headline | 		// Headline | ||||||
| @@ -207,7 +207,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener { | |||||||
|  |  | ||||||
| 		switch ($action) { | 		switch ($action) { | ||||||
| 			case self::ACTION_REVOKE_RIGHTS: | 			case self::ACTION_REVOKE_RIGHTS: | ||||||
| 				$this->maniaControl->playerManager->playerActions->revokeAuthLevel($adminLogin, $targetLogin); | 				$this->maniaControl->playerManager->getPlayerActions()->revokeAuthLevel($adminLogin, $targetLogin); | ||||||
| 				break; | 				break; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -17,6 +17,7 @@ class AuthCommands implements CommandListener { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -33,15 +33,17 @@ class AuthenticationManager implements CallbackListener { | |||||||
| 	const CB_AUTH_LEVEL_CHANGED  = 'AuthenticationManager.AuthLevelChanged'; | 	const CB_AUTH_LEVEL_CHANGED  = 'AuthenticationManager.AuthLevelChanged'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  | 	/** @var AuthCommands $authCommands */ | ||||||
| 	private $authCommands = null; | 	private $authCommands = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Construct a new Authentication Manager | 	 * Construct a new Authentication Manager instance | ||||||
| 	 * | 	 * | ||||||
| 	 * @param \ManiaControl\ManiaControl $maniaControl | 	 * @param ManiaControl $maniaControl | ||||||
| 	 */ | 	 */ | ||||||
| 	public function __construct(ManiaControl $maniaControl) { | 	public function __construct(ManiaControl $maniaControl) { | ||||||
| 		$this->maniaControl = $maniaControl; | 		$this->maniaControl = $maniaControl; | ||||||
|   | |||||||
| @@ -12,7 +12,6 @@ use ManiaControl\Players\Player; | |||||||
|  * @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 BillData { | class BillData { | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Public properties | 	 * Public properties | ||||||
| 	 */ | 	 */ | ||||||
|   | |||||||
| @@ -28,6 +28,7 @@ class BillManager implements CallbackListener { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $openBills = array(); | 	private $openBills = array(); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -13,8 +13,9 @@ use ManiaControl\ManiaControl; | |||||||
|  */ |  */ | ||||||
| class LibXmlRpcCallbacks implements CallbackListener { | class LibXmlRpcCallbacks implements CallbackListener { | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -22,8 +22,9 @@ class ShootManiaCallbacks implements CallbackListener { | |||||||
| 	const CB_TIMEATTACK_ONFINISH     = 'TimeAttack_OnFinish'; | 	const CB_TIMEATTACK_ONFINISH     = 'TimeAttack_OnFinish'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -48,7 +49,7 @@ class ShootManiaCallbacks implements CallbackListener { | |||||||
| 	public function handleScriptCallbacks($name, $data) { | 	public function handleScriptCallbacks($name, $data) { | ||||||
| 		switch ($name) { | 		switch ($name) { | ||||||
| 			case 'LibXmlRpc_Rankings': | 			case 'LibXmlRpc_Rankings': | ||||||
| 				$this->maniaControl->server->rankingManager->updateRankings($data[0]); | 				$this->maniaControl->server->getRankingManager()->updateRankings($data[0]); | ||||||
| 				break; | 				break; | ||||||
| 			case 'LibXmlRpc_Scores': | 			case 'LibXmlRpc_Scores': | ||||||
| 				$this->maniaControl->callbackManager->triggerCallback(Callbacks::SCORES, $data[0]); | 				$this->maniaControl->callbackManager->triggerCallback(Callbacks::SCORES, $data[0]); | ||||||
|   | |||||||
| @@ -13,9 +13,11 @@ use ManiaControl\ManiaControl; | |||||||
|  */ |  */ | ||||||
| class TimerManager { | class TimerManager { | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  | 	/** @var TimerListening[] $timerListenings */ | ||||||
| 	private $timerListenings = array(); | 	private $timerListenings = array(); | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -15,8 +15,9 @@ use ManiaControl\Utils\Formatter; | |||||||
|  */ |  */ | ||||||
| class TrackManiaCallbacks implements CallbackListener { | class TrackManiaCallbacks implements CallbackListener { | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -24,8 +24,9 @@ class Chat { | |||||||
| 	const SETTING_FORMAT_USAGEINFO   = 'UsageInfo Format'; | 	const SETTING_FORMAT_USAGEINFO   = 'UsageInfo Format'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -18,6 +18,7 @@ class CommandManager implements CallbackListener { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	/** @var HelpManager $helpManager */ | 	/** @var HelpManager $helpManager */ | ||||||
| 	private $helpManager = array(); | 	private $helpManager = array(); | ||||||
|   | |||||||
| @@ -22,8 +22,9 @@ use ManiaControl\Players\Player; | |||||||
| // TODO: refactor code - i see duplicated code all over the place.. | // TODO: refactor code - i see duplicated code all over the place.. | ||||||
| class HelpManager implements CommandListener, CallbackListener { | class HelpManager implements CommandListener, CallbackListener { | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $playerCommands = array(); | 	private $playerCommands = array(); | ||||||
| 	private $adminCommands = array(); | 	private $adminCommands = array(); | ||||||
| @@ -160,8 +161,8 @@ class HelpManager implements CommandListener, CallbackListener { | |||||||
| 	 * @param mixed $player | 	 * @param mixed $player | ||||||
| 	 */ | 	 */ | ||||||
| 	private function showHelpAllList(array $commands, $player) { | 	private function showHelpAllList(array $commands, $player) { | ||||||
| 		$width  = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width  = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$height = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
|  |  | ||||||
| 		// create manialink | 		// create manialink | ||||||
| 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | ||||||
| @@ -170,7 +171,7 @@ class HelpManager implements CommandListener, CallbackListener { | |||||||
| 		$script->addFeature($paging); | 		$script->addFeature($paging); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| 		$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script, $paging); | 		$frame = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultListFrame($script, $paging); | ||||||
| 		$maniaLink->add($frame); | 		$maniaLink->add($frame); | ||||||
|  |  | ||||||
| 		// Start offsets | 		// Start offsets | ||||||
| @@ -178,7 +179,7 @@ class HelpManager implements CommandListener, CallbackListener { | |||||||
| 		$posY = $height / 2; | 		$posY = $height / 2; | ||||||
|  |  | ||||||
| 		//Predefine description Label | 		//Predefine description Label | ||||||
| 		$descriptionLabel = $this->maniaControl->manialinkManager->styleManager->getDefaultDescriptionLabel(); | 		$descriptionLabel = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultDescriptionLabel(); | ||||||
| 		$frame->add($descriptionLabel); | 		$frame->add($descriptionLabel); | ||||||
|  |  | ||||||
| 		// Headline | 		// Headline | ||||||
|   | |||||||
| @@ -47,6 +47,7 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	/** @var ServerOptionsMenu $serverOptionsMenu */ | 	/** @var ServerOptionsMenu $serverOptionsMenu */ | ||||||
| 	private $serverOptionsMenu = null; | 	private $serverOptionsMenu = null; | ||||||
|   | |||||||
| @@ -15,14 +15,14 @@ use ManiaControl\Players\Player; | |||||||
| interface ConfiguratorMenu { | interface ConfiguratorMenu { | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Get the Menu Title | 	 * Get the menu title | ||||||
| 	 * | 	 * | ||||||
| 	 * @return string | 	 * @return string | ||||||
| 	 */ | 	 */ | ||||||
| 	public static function getTitle(); | 	public static function getTitle(); | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Get the Configurator Menu Frame | 	 * Get the configurator menu frame | ||||||
| 	 * | 	 * | ||||||
| 	 * @param float  $width | 	 * @param float  $width | ||||||
| 	 * @param float  $height | 	 * @param float  $height | ||||||
| @@ -33,7 +33,7 @@ interface ConfiguratorMenu { | |||||||
| 	public function getMenu($width, $height, Script $script, Player $player); | 	public function getMenu($width, $height, Script $script, Player $player); | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Save the Config Data | 	 * Save the config data | ||||||
| 	 * | 	 * | ||||||
| 	 * @param array  $configData | 	 * @param array  $configData | ||||||
| 	 * @param Player $player | 	 * @param Player $player | ||||||
|   | |||||||
| @@ -40,6 +40,7 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -39,6 +39,7 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ namespace ManiaControl\Database; | |||||||
|  */ |  */ | ||||||
| class Config { | class Config { | ||||||
| 	/* | 	/* | ||||||
| 	 * Public Properties | 	 * Public properties | ||||||
| 	 */ | 	 */ | ||||||
| 	public $host = null; | 	public $host = null; | ||||||
| 	public $port = null; | 	public $port = null; | ||||||
|   | |||||||
| @@ -18,15 +18,16 @@ class Database implements TimerListener { | |||||||
| 	 */ | 	 */ | ||||||
| 	/** @var \mysqli $mysqli */ | 	/** @var \mysqli $mysqli */ | ||||||
| 	public $mysqli = null; | 	public $mysqli = null; | ||||||
| 	/** @var MigrationHelper $migrationHelper */ |  | ||||||
| 	public $migrationHelper = null; |  | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	/** @var Config $config */ | 	/** @var Config $config */ | ||||||
| 	private $config = null; | 	private $config = null; | ||||||
|  | 	/** @var MigrationHelper $migrationHelper */ | ||||||
|  | 	private $migrationHelper = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Construct a new Database Connection | 	 * Construct a new Database Connection | ||||||
|   | |||||||
| @@ -17,6 +17,7 @@ class MigrationHelper { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -25,15 +25,16 @@ class ErrorHandler { | |||||||
| 	const LOG_SUPPRESSED_ERRORS        = false; | 	const LOG_SUPPRESSED_ERRORS        = false; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $handlingError = null; | 	private $handlingError = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Construct a new error handler instance | 	 * Construct a new error handler instance | ||||||
| 	 * | 	 * | ||||||
| 	 * @param ManiaControl @maniaControl | 	 * @param ManiaControl $maniaControl | ||||||
| 	 */ | 	 */ | ||||||
| 	public function __construct(ManiaControl $maniaControl) { | 	public function __construct(ManiaControl $maniaControl) { | ||||||
| 		$this->maniaControl = $maniaControl; | 		$this->maniaControl = $maniaControl; | ||||||
|   | |||||||
| @@ -20,8 +20,9 @@ class AsynchronousFileReader { | |||||||
| 	const CONTENT_TYPE_JSON = 'application/json'; | 	const CONTENT_TYPE_JSON = 'application/json'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	/** @var Request[] $requests */ | 	/** @var Request[] $requests */ | ||||||
| 	private $requests = array(); | 	private $requests = array(); | ||||||
|   | |||||||
| @@ -57,7 +57,7 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener { | |||||||
| 	const SETTING_PERMISSION_RESTART  = 'Restart ManiaControl'; | 	const SETTING_PERMISSION_RESTART  = 'Restart ManiaControl'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Public Properties | 	 * Public properties | ||||||
| 	 */ | 	 */ | ||||||
| 	public $actionsMenu = null; | 	public $actionsMenu = null; | ||||||
| 	public $authenticationManager = null; | 	public $authenticationManager = null; | ||||||
| @@ -85,12 +85,12 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener { | |||||||
| 	public $billManager = null; | 	public $billManager = null; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	private $requestQuitMessage = null; | 	private $requestQuitMessage = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Construct ManiaControl | 	 * Construct a new ManiaControl instance | ||||||
| 	 */ | 	 */ | ||||||
| 	public function __construct() { | 	public function __construct() { | ||||||
| 		$this->log('Loading ManiaControl v' . self::VERSION . ' ...'); | 		$this->log('Loading ManiaControl v' . self::VERSION . ' ...'); | ||||||
| @@ -339,7 +339,7 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener { | |||||||
| 		$this->client->sendHideManialinkPage(); | 		$this->client->sendHideManialinkPage(); | ||||||
|  |  | ||||||
| 		// Enable script callbacks | 		// Enable script callbacks | ||||||
| 		$this->server->scriptManager->enableScriptCallbacks(); | 		$this->server->getScriptManager()->enableScriptCallbacks(); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -13,6 +13,9 @@ use ManiaControl\Utils\Formatter; | |||||||
|  * @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 MXMapInfo { | class MXMapInfo { | ||||||
|  | 	/* | ||||||
|  | 	 * Public properties | ||||||
|  | 	 */ | ||||||
| 	public $prefix, $id, $uid, $name, $userid, $author, $uploaded, $updated, $type, $maptype; | 	public $prefix, $id, $uid, $name, $userid, $author, $uploaded, $updated, $type, $maptype; | ||||||
| 	public $titlepack, $style, $envir, $mood, $dispcost, $lightmap, $modname, $exever; | 	public $titlepack, $style, $envir, $mood, $dispcost, $lightmap, $modname, $exever; | ||||||
| 	public $exebld, $routes, $length, $unlimiter, $laps, $difficulty, $lbrating, $trkvalue; | 	public $exebld, $routes, $length, $unlimiter, $laps, $difficulty, $lbrating, $trkvalue; | ||||||
|   | |||||||
| @@ -43,8 +43,9 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener | |||||||
| 	const MAX_MX_MAPS_PER_PAGE        = 14; | 	const MAX_MX_MAPS_PER_PAGE        = 14; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $mapListShown = array(); | 	private $mapListShown = array(); | ||||||
|  |  | ||||||
| @@ -130,7 +131,7 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener | |||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		// search for matching maps | 		// search for matching maps | ||||||
| 		$this->maniaControl->mapManager->mxManager->fetchMapsAsync(function (array $maps) use (&$player) { | 		$this->maniaControl->mapManager->getMXManager()->fetchMapsAsync(function (array $maps) use (&$player) { | ||||||
| 			if (!$maps) { | 			if (!$maps) { | ||||||
| 				$this->maniaControl->chat->sendError('No maps found, or MX is down!', $player->login); | 				$this->maniaControl->chat->sendError('No maps found, or MX is down!', $player->login); | ||||||
| 				return; | 				return; | ||||||
| @@ -148,8 +149,8 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener | |||||||
| 	 */ | 	 */ | ||||||
| 	private function showManiaExchangeList(array $maps, Player $player) { | 	private function showManiaExchangeList(array $maps, Player $player) { | ||||||
| 		// Start offsets | 		// Start offsets | ||||||
| 		$width  = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width  = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$height = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
| 		$posX   = -$width / 2; | 		$posX   = -$width / 2; | ||||||
| 		$posY   = $height / 2; | 		$posY   = $height / 2; | ||||||
|  |  | ||||||
| @@ -160,11 +161,11 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener | |||||||
| 		$script->addFeature($paging); | 		$script->addFeature($paging); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| 		$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script, $paging); | 		$frame = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultListFrame($script, $paging); | ||||||
| 		$maniaLink->add($frame); | 		$maniaLink->add($frame); | ||||||
|  |  | ||||||
| 		//Predefine description Label | 		//Predefine description Label | ||||||
| 		$descriptionLabel = $this->maniaControl->manialinkManager->styleManager->getDefaultDescriptionLabel(); | 		$descriptionLabel = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultDescriptionLabel(); | ||||||
| 		$frame->add($descriptionLabel); | 		$frame->add($descriptionLabel); | ||||||
|  |  | ||||||
| 		// Headline | 		// Headline | ||||||
| @@ -210,8 +211,8 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener | |||||||
| 			$mxQuad = new Quad(); | 			$mxQuad = new Quad(); | ||||||
| 			$mapFrame->add($mxQuad); | 			$mapFrame->add($mxQuad); | ||||||
| 			$mxQuad->setSize(3, 3); | 			$mxQuad->setSize(3, 3); | ||||||
| 			$mxQuad->setImage($this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON)); | 			$mxQuad->setImage($this->maniaControl->manialinkManager->getIconManager()->getIcon(IconManager::MX_ICON)); | ||||||
| 			$mxQuad->setImageFocus($this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON_MOVER)); | 			$mxQuad->setImageFocus($this->maniaControl->manialinkManager->getIconManager()->getIcon(IconManager::MX_ICON_MOVER)); | ||||||
| 			$mxQuad->setX($posX + 56); | 			$mxQuad->setX($posX + 56); | ||||||
| 			$mxQuad->setUrl($map->pageurl); | 			$mxQuad->setUrl($map->pageurl); | ||||||
| 			$mxQuad->setZ(0.01); | 			$mxQuad->setZ(0.01); | ||||||
|   | |||||||
| @@ -44,8 +44,9 @@ class ManiaExchangeManager { | |||||||
| 	const MIN_EXE_BUILD = "2014-04-01_00_00"; | 	const MIN_EXE_BUILD = "2014-04-01_00_00"; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $mxIdUidVector = array(); | 	private $mxIdUidVector = array(); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -25,6 +25,7 @@ class CustomUIManager implements CallbackListener, TimerListener { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	/** @var customUI $customUI */ | 	/** @var customUI $customUI */ | ||||||
| 	private $customUI = null; | 	private $customUI = null; | ||||||
|   | |||||||
| @@ -25,7 +25,7 @@ class IconManager implements CallbackListener { | |||||||
| 	const DEFAULT_IMG_URL = 'http://images.maniacontrol.com/icons/'; | 	const DEFAULT_IMG_URL = 'http://images.maniacontrol.com/icons/'; | ||||||
| 	const PRELOAD_MLID    = 'IconManager.Preload.MLID'; | 	const PRELOAD_MLID    = 'IconManager.Preload.MLID'; | ||||||
|  |  | ||||||
| 	/** | 	/* | ||||||
| 	 * Default icons | 	 * Default icons | ||||||
| 	 */ | 	 */ | ||||||
| 	const MX_ICON       = 'ManiaExchange.png'; | 	const MX_ICON       = 'ManiaExchange.png'; | ||||||
| @@ -34,9 +34,10 @@ class IconManager implements CallbackListener { | |||||||
| 	const MX_ICON_GREEN       = 'ManiaExchangeGreen.png'; | 	const MX_ICON_GREEN       = 'ManiaExchangeGreen.png'; | ||||||
| 	const MX_ICON_GREEN_MOVER = 'ManiaExchange_logo_pressGreen.png'; | 	const MX_ICON_GREEN_MOVER = 'ManiaExchange_logo_pressGreen.png'; | ||||||
|  |  | ||||||
| 	/** | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $icons = array(); | 	private $icons = array(); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -33,15 +33,19 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener | |||||||
| 	 * Public properties | 	 * Public properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var StyleManager $styleManager */ | 	/** @var StyleManager $styleManager */ | ||||||
|  | 	/** @deprecated see getStyleManager() */ | ||||||
| 	public $styleManager = null; | 	public $styleManager = null; | ||||||
| 	/** @var CustomUIManager $customUIManager */ | 	/** @var CustomUIManager $customUIManager */ | ||||||
|  | 	/** @deprecated see getCustomUIManager() */ | ||||||
| 	public $customUIManager = null; | 	public $customUIManager = null; | ||||||
| 	/** @var IconManager $iconManager */ | 	/** @var IconManager $iconManager */ | ||||||
|  | 	/** @deprecated see getIconManager() */ | ||||||
| 	public $iconManager = null; | 	public $iconManager = null; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	// TODO: use listening class | 	// TODO: use listening class | ||||||
| 	private $pageAnswerListeners = array(); | 	private $pageAnswerListeners = array(); | ||||||
|   | |||||||
| @@ -38,10 +38,11 @@ class StyleManager { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Create a new style manager instance | 	 * Construct a new style manager instance | ||||||
| 	 * | 	 * | ||||||
| 	 * @param ManiaControl $maniaControl | 	 * @param ManiaControl $maniaControl | ||||||
| 	 */ | 	 */ | ||||||
|   | |||||||
| @@ -43,10 +43,11 @@ class DirectoryBrowser implements ManialinkPageAnswerListener { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Create a new directory browser instance | 	 * Construct a new directory browser instance | ||||||
| 	 * | 	 * | ||||||
| 	 * @param ManiaControl $maniaControl | 	 * @param ManiaControl $maniaControl | ||||||
| 	 */ | 	 */ | ||||||
| @@ -93,7 +94,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener { | |||||||
| 		$oldFolderPath  = $player->getCache($this, self::CACHE_FOLDER_PATH); | 		$oldFolderPath  = $player->getCache($this, self::CACHE_FOLDER_PATH); | ||||||
| 		$isInMapsFolder = false; | 		$isInMapsFolder = false; | ||||||
| 		if (!$oldFolderPath) { | 		if (!$oldFolderPath) { | ||||||
| 			$oldFolderPath  = $this->maniaControl->server->directory->getMapsFolder(); | 			$oldFolderPath  = $this->maniaControl->server->getDirectory()->getMapsFolder(); | ||||||
| 			$isInMapsFolder = true; | 			$isInMapsFolder = true; | ||||||
| 		} | 		} | ||||||
| 		$folderPath = $oldFolderPath; | 		$folderPath = $oldFolderPath; | ||||||
| @@ -104,12 +105,12 @@ class DirectoryBrowser implements ManialinkPageAnswerListener { | |||||||
| 				$folderName = basename($newFolderPath); | 				$folderName = basename($newFolderPath); | ||||||
| 				switch ($folderName) { | 				switch ($folderName) { | ||||||
| 					case 'Maps': | 					case 'Maps': | ||||||
| 						$mapsDir        = dirname($this->maniaControl->server->directory->getMapsFolder()); | 						$mapsDir        = dirname($this->maniaControl->server->getDirectory()->getMapsFolder()); | ||||||
| 						$folderDir      = dirname($folderPath); | 						$folderDir      = dirname($folderPath); | ||||||
| 						$isInMapsFolder = ($mapsDir === $folderDir); | 						$isInMapsFolder = ($mapsDir === $folderDir); | ||||||
| 						break; | 						break; | ||||||
| 					case 'UserData': | 					case 'UserData': | ||||||
| 						$dataDir   = dirname($this->maniaControl->server->directory->getGameDataFolder()); | 						$dataDir   = dirname($this->maniaControl->server->getDirectory()->getGameDataFolder()); | ||||||
| 						$folderDir = dirname($folderPath); | 						$folderDir = dirname($folderPath); | ||||||
| 						if ($dataDir === $folderDir) { | 						if ($dataDir === $folderDir) { | ||||||
| 							// Prevent navigation out of maps directory | 							// Prevent navigation out of maps directory | ||||||
| @@ -125,11 +126,11 @@ class DirectoryBrowser implements ManialinkPageAnswerListener { | |||||||
| 		$script    = $maniaLink->getScript(); | 		$script    = $maniaLink->getScript(); | ||||||
| 		$paging    = new Paging(); | 		$paging    = new Paging(); | ||||||
| 		$script->addFeature($paging); | 		$script->addFeature($paging); | ||||||
| 		$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script, $paging); | 		$frame = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultListFrame($script, $paging); | ||||||
| 		$maniaLink->add($frame); | 		$maniaLink->add($frame); | ||||||
|  |  | ||||||
| 		$width     = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width     = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$height    = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height    = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
| 		$index     = 0; | 		$index     = 0; | ||||||
| 		$posY      = $height / 2 - 10; | 		$posY      = $height / 2 - 10; | ||||||
| 		$pageFrame = null; | 		$pageFrame = null; | ||||||
| @@ -153,7 +154,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener { | |||||||
|  |  | ||||||
| 		$directoryLabel = new Label_Text(); | 		$directoryLabel = new Label_Text(); | ||||||
| 		$frame->add($directoryLabel); | 		$frame->add($directoryLabel); | ||||||
| 		$dataFolder    = $this->maniaControl->server->directory->getGameDataFolder(); | 		$dataFolder    = $this->maniaControl->server->getDirectory()->getGameDataFolder(); | ||||||
| 		$directoryText = substr($folderPath, strlen($dataFolder)); | 		$directoryText = substr($folderPath, strlen($dataFolder)); | ||||||
| 		$directoryLabel->setPosition($width * -0.41, $height * 0.45) | 		$directoryLabel->setPosition($width * -0.41, $height * 0.45) | ||||||
| 		               ->setSize($width * 0.85, 4) | 		               ->setSize($width * 0.85, 4) | ||||||
| @@ -368,7 +369,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener { | |||||||
| 		$folderPath = $player->getCache($this, self::CACHE_FOLDER_PATH); | 		$folderPath = $player->getCache($this, self::CACHE_FOLDER_PATH); | ||||||
| 		$filePath   = $folderPath . $fileName; | 		$filePath   = $folderPath . $fileName; | ||||||
|  |  | ||||||
| 		$mapsFolder       = $this->maniaControl->server->directory->getMapsFolder(); | 		$mapsFolder       = $this->maniaControl->server->getDirectory()->getMapsFolder(); | ||||||
| 		$relativeFilePath = substr($filePath, strlen($mapsFolder)); | 		$relativeFilePath = substr($filePath, strlen($mapsFolder)); | ||||||
|  |  | ||||||
| 		// Check for valid map | 		// Check for valid map | ||||||
| @@ -401,7 +402,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener { | |||||||
| 		$this->maniaControl->log($message, true); | 		$this->maniaControl->log($message, true); | ||||||
|  |  | ||||||
| 		// Queue requested Map | 		// Queue requested Map | ||||||
| 		$this->maniaControl->mapManager->mapQueue->addMapToMapQueue($player, $map); | 		$this->maniaControl->mapManager->getMapQueue()->addMapToMapQueue($player, $map); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -16,6 +16,7 @@ class MapActions { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -32,10 +33,10 @@ class MapActions { | |||||||
| 	 */ | 	 */ | ||||||
| 	public function skipMap() { | 	public function skipMap() { | ||||||
| 		//Force a EndMap on the MapQueue to set the next Map | 		//Force a EndMap on the MapQueue to set the next Map | ||||||
| 		$this->maniaControl->mapManager->mapQueue->endMap(null); | 		$this->maniaControl->mapManager->getMapQueue()->endMap(null); | ||||||
|  |  | ||||||
| 		//ignore EndMap on MapQueue | 		//ignore EndMap on MapQueue | ||||||
| 		$this->maniaControl->mapManager->mapQueue->dontQueueNextMapChange(); | 		$this->maniaControl->mapManager->getMapQueue()->dontQueueNextMapChange(); | ||||||
|  |  | ||||||
| 		//Switch The Map | 		//Switch The Map | ||||||
| 		try { | 		try { | ||||||
|   | |||||||
| @@ -36,6 +36,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -77,8 +78,8 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
| 	private function initActionsMenuButtons() { | 	private function initActionsMenuButtons() { | ||||||
| 		// Menu Open xList | 		// Menu Open xList | ||||||
| 		$itemQuad = new Quad(); | 		$itemQuad = new Quad(); | ||||||
| 		$itemQuad->setImage($this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON)); | 		$itemQuad->setImage($this->maniaControl->manialinkManager->getIconManager()->getIcon(IconManager::MX_ICON)); | ||||||
| 		$itemQuad->setImageFocus($this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON_MOVER)); | 		$itemQuad->setImageFocus($this->maniaControl->manialinkManager->getIconManager()->getIcon(IconManager::MX_ICON_MOVER)); | ||||||
| 		$itemQuad->setAction(self::ACTION_OPEN_XLIST); | 		$itemQuad->setAction(self::ACTION_OPEN_XLIST); | ||||||
| 		$this->maniaControl->actionsMenu->addPlayerMenuItem($itemQuad, 5, 'Open MX List'); | 		$this->maniaControl->actionsMenu->addPlayerMenuItem($itemQuad, 5, 'Open MX List'); | ||||||
|  |  | ||||||
| @@ -108,7 +109,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
| 	 * @param Player $player | 	 * @param Player $player | ||||||
| 	 */ | 	 */ | ||||||
| 	public function command_ShowNextMap(array $chatCallback, Player $player) { | 	public function command_ShowNextMap(array $chatCallback, Player $player) { | ||||||
| 		$nextQueued = $this->maniaControl->mapManager->mapQueue->getNextQueuedMap(); | 		$nextQueued = $this->maniaControl->mapManager->getMapQueue()->getNextQueuedMap(); | ||||||
| 		if ($nextQueued) { | 		if ($nextQueued) { | ||||||
| 			/** @var Player $requester */ | 			/** @var Player $requester */ | ||||||
| 			$requester = $nextQueued[0]; | 			$requester = $nextQueued[0]; | ||||||
| @@ -216,7 +217,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		$this->maniaControl->mapManager->mapActions->skipMap(); | 		$this->maniaControl->mapManager->getMapActions()->skipMap(); | ||||||
|  |  | ||||||
| 		$message = '$<' . $player->nickname . '$> skipped the current Map!'; | 		$message = '$<' . $player->nickname . '$> skipped the current Map!'; | ||||||
| 		$this->maniaControl->chat->sendSuccess($message); | 		$this->maniaControl->chat->sendSuccess($message); | ||||||
| @@ -260,7 +261,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
| 		$this->maniaControl->chat->sendSuccess($message); | 		$this->maniaControl->chat->sendSuccess($message); | ||||||
| 		$this->maniaControl->log($message, true); | 		$this->maniaControl->log($message, true); | ||||||
|  |  | ||||||
| 		$this->maniaControl->mapManager->mapQueue->addFirstMapToMapQueue($player, $this->maniaControl->mapManager->getCurrentMap()); | 		$this->maniaControl->mapManager->getMapQueue()->addFirstMapToMapQueue($player, $this->maniaControl->mapManager->getCurrentMap()); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -347,7 +348,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
|  |  | ||||||
| 		if (strstr($actionId, self::ACTION_SHOW_AUTHOR)) { | 		if (strstr($actionId, self::ACTION_SHOW_AUTHOR)) { | ||||||
| 			$login = str_replace(self::ACTION_SHOW_AUTHOR, '', $actionId); | 			$login = str_replace(self::ACTION_SHOW_AUTHOR, '', $actionId); | ||||||
| 			$this->maniaControl->mapManager->mapList->playerCloseWidget($player); | 			$this->maniaControl->mapManager->getMapList()->playerCloseWidget($player); | ||||||
| 			$this->showMapListAuthor($login, $player); | 			$this->showMapListAuthor($login, $player); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| @@ -373,7 +374,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		$this->maniaControl->mapManager->mapList->showMapList($player, $mapList); | 		$this->maniaControl->mapManager->getMapList()->showMapList($player, $mapList); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -384,7 +385,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
| 	 */ | 	 */ | ||||||
| 	public function command_List(array $chatCallback, Player $player) { | 	public function command_List(array $chatCallback, Player $player) { | ||||||
| 		$chatCommands = explode(' ', $chatCallback[1][2]); | 		$chatCommands = explode(' ', $chatCallback[1][2]); | ||||||
| 		$this->maniaControl->mapManager->mapList->playerCloseWidget($player); | 		$this->maniaControl->mapManager->getMapList()->playerCloseWidget($player); | ||||||
|  |  | ||||||
| 		if (isset($chatCommands[1])) { | 		if (isset($chatCommands[1])) { | ||||||
| 			$listParam = strtolower($chatCommands[1]); | 			$listParam = strtolower($chatCommands[1]); | ||||||
| @@ -409,11 +410,11 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
| 					} | 					} | ||||||
| 					break; | 					break; | ||||||
| 				default: | 				default: | ||||||
| 					$this->maniaControl->mapManager->mapList->showMapList($player); | 					$this->maniaControl->mapManager->getMapList()->showMapList($player); | ||||||
| 					break; | 					break; | ||||||
| 			} | 			} | ||||||
| 		} else { | 		} else { | ||||||
| 			$this->maniaControl->mapManager->mapList->showMapList($player); | 			$this->maniaControl->mapManager->getMapList()->showMapList($player); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @@ -462,7 +463,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
| 				$mapList = array_reverse($mapList); | 				$mapList = array_reverse($mapList); | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			$this->maniaControl->mapManager->mapList->showMapList($player, $mapList); | 			$this->maniaControl->mapManager->getMapList()->showMapList($player, $mapList); | ||||||
| 		} else { | 		} else { | ||||||
| 			$this->maniaControl->chat->sendError('KarmaPlugin is not enabled!', $player->login); | 			$this->maniaControl->chat->sendError('KarmaPlugin is not enabled!', $player->login); | ||||||
| 		} | 		} | ||||||
| @@ -484,7 +485,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
| 			$maps = array_reverse($maps); | 			$maps = array_reverse($maps); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		$this->maniaControl->mapManager->mapList->showMapList($player, $maps); | 		$this->maniaControl->mapManager->getMapList()->showMapList($player, $maps); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -494,6 +495,6 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb | |||||||
| 	 * @param Player $player | 	 * @param Player $player | ||||||
| 	 */ | 	 */ | ||||||
| 	public function command_xList(array $chatCallback, Player $player) { | 	public function command_xList(array $chatCallback, Player $player) { | ||||||
| 		$this->maniaControl->mapManager->mxList->showList($chatCallback, $player); | 		$this->maniaControl->mapManager->getMXList()->showList($chatCallback, $player); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|   | |||||||
| @@ -59,6 +59,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -90,7 +91,8 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 	 */ | 	 */ | ||||||
| 	public function clearMapQueue(array $chatCallback, Player $player) { | 	public function clearMapQueue(array $chatCallback, Player $player) { | ||||||
| 		// Clears the Map Queue | 		// Clears the Map Queue | ||||||
| 		$this->maniaControl->mapManager->mapQueue->clearMapQueue($player); | 		$this->maniaControl->mapManager->getMapQueue() | ||||||
|  | 		                               ->clearMapQueue($player); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -101,7 +103,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 	 */ | 	 */ | ||||||
| 	public function checkUpdates(array $chatCallback, Player $player) { | 	public function checkUpdates(array $chatCallback, Player $player) { | ||||||
| 		// Update Mx Infos | 		// Update Mx Infos | ||||||
| 		$this->maniaControl->mapManager->mxManager->fetchManiaExchangeMapInformation(); | 		$this->maniaControl->mapManager->getMXManager()->fetchManiaExchangeMapInformation(); | ||||||
|  |  | ||||||
| 		// Reshow the Maplist | 		// Reshow the Maplist | ||||||
| 		$this->showMapList($player); | 		$this->showMapList($player); | ||||||
| @@ -115,14 +117,17 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 	 * @param int    $pageIndex | 	 * @param int    $pageIndex | ||||||
| 	 */ | 	 */ | ||||||
| 	public function showMapList(Player $player, $mapList = null, $pageIndex = -1) { | 	public function showMapList(Player $player, $mapList = null, $pageIndex = -1) { | ||||||
| 		$width  = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width  = $this->maniaControl->manialinkManager->getStyleManager() | ||||||
| 		$height = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		                                               ->getListWidgetsWidth(); | ||||||
|  | 		$height = $this->maniaControl->manialinkManager->getStyleManager() | ||||||
|  | 		                                               ->getListWidgetsHeight(); | ||||||
|  |  | ||||||
| 		if ($pageIndex < 0) { | 		if ($pageIndex < 0) { | ||||||
| 			$pageIndex = (int)$player->getCache($this, self::CACHE_CURRENT_PAGE); | 			$pageIndex = (int)$player->getCache($this, self::CACHE_CURRENT_PAGE); | ||||||
| 		} | 		} | ||||||
| 		$player->setCache($this, self::CACHE_CURRENT_PAGE, $pageIndex); | 		$player->setCache($this, self::CACHE_CURRENT_PAGE, $pageIndex); | ||||||
| 		$queueBuffer = $this->maniaControl->mapManager->mapQueue->getQueueBuffer(); | 		$queueBuffer = $this->maniaControl->mapManager->getMapQueue() | ||||||
|  | 		                                              ->getQueueBuffer(); | ||||||
|  |  | ||||||
| 		$chunkIndex     = $this->getChunkIndexFromPageNumber($pageIndex); | 		$chunkIndex     = $this->getChunkIndexFromPageNumber($pageIndex); | ||||||
| 		$mapsBeginIndex = $this->getChunkMapsBeginIndex($chunkIndex); | 		$mapsBeginIndex = $this->getChunkMapsBeginIndex($chunkIndex); | ||||||
| @@ -146,7 +151,8 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 		$paging->setChunkActions(self::ACTION_PAGING_CHUNKS); | 		$paging->setChunkActions(self::ACTION_PAGING_CHUNKS); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| 		$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script, $paging); | 		$frame = $this->maniaControl->manialinkManager->getStyleManager() | ||||||
|  | 		                                              ->getDefaultListFrame($script, $paging); | ||||||
| 		$maniaLink->add($frame); | 		$maniaLink->add($frame); | ||||||
|  |  | ||||||
| 		// Admin Buttons | 		// Admin Buttons | ||||||
| @@ -188,8 +194,10 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 			$mxQuad = new Quad(); | 			$mxQuad = new Quad(); | ||||||
| 			$frame->add($mxQuad); | 			$frame->add($mxQuad); | ||||||
| 			$mxQuad->setSize(3, 3); | 			$mxQuad->setSize(3, 3); | ||||||
| 			$mxQuad->setImage($this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON_GREEN)); | 			$mxQuad->setImage($this->maniaControl->manialinkManager->getIconManager() | ||||||
| 			$mxQuad->setImageFocus($this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON_GREEN_MOVER)); | 			                                                       ->getIcon(IconManager::MX_ICON_GREEN)); | ||||||
|  | 			$mxQuad->setImageFocus($this->maniaControl->manialinkManager->getIconManager() | ||||||
|  | 			                                                            ->getIcon(IconManager::MX_ICON_GREEN_MOVER)); | ||||||
| 			$mxQuad->setPosition($width / 2 - 67, -$height / 2 + 9); | 			$mxQuad->setPosition($width / 2 - 67, -$height / 2 + 9); | ||||||
| 			$mxQuad->setZ(0.01); | 			$mxQuad->setZ(0.01); | ||||||
| 			$mxQuad->setAction(self::ACTION_CHECK_UPDATE); | 			$mxQuad->setAction(self::ACTION_CHECK_UPDATE); | ||||||
| @@ -220,10 +228,12 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 		$this->maniaControl->manialinkManager->labelLine($headFrame, $array); | 		$this->maniaControl->manialinkManager->labelLine($headFrame, $array); | ||||||
|  |  | ||||||
| 		// Predefine description Label | 		// Predefine description Label | ||||||
| 		$descriptionLabel = $this->maniaControl->manialinkManager->styleManager->getDefaultDescriptionLabel(); | 		$descriptionLabel = $this->maniaControl->manialinkManager->getStyleManager() | ||||||
|  | 		                                                         ->getDefaultDescriptionLabel(); | ||||||
| 		$frame->add($descriptionLabel); | 		$frame->add($descriptionLabel); | ||||||
|  |  | ||||||
| 		$queuedMaps = $this->maniaControl->mapManager->mapQueue->getQueuedMapsRanking(); | 		$queuedMaps = $this->maniaControl->mapManager->getMapQueue() | ||||||
|  | 		                                             ->getQueuedMapsRanking(); | ||||||
| 		/** @var KarmaPlugin $karmaPlugin */ | 		/** @var KarmaPlugin $karmaPlugin */ | ||||||
| 		$karmaPlugin = $this->maniaControl->pluginManager->getPlugin(self::DEFAULT_KARMA_PLUGIN); | 		$karmaPlugin = $this->maniaControl->pluginManager->getPlugin(self::DEFAULT_KARMA_PLUGIN); | ||||||
|  |  | ||||||
| @@ -236,10 +246,14 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 		$pageFrame = null; | 		$pageFrame = null; | ||||||
|  |  | ||||||
| 		$currentMap       = $this->maniaControl->mapManager->getCurrentMap(); | 		$currentMap       = $this->maniaControl->mapManager->getCurrentMap(); | ||||||
| 		$mxIcon           = $this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON); | 		$mxIcon           = $this->maniaControl->manialinkManager->getIconManager() | ||||||
| 		$mxIconHover      = $this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON_MOVER); | 		                                                         ->getIcon(IconManager::MX_ICON); | ||||||
| 		$mxIconGreen      = $this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON_GREEN); | 		$mxIconHover      = $this->maniaControl->manialinkManager->getIconManager() | ||||||
| 		$mxIconGreenHover = $this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON_GREEN_MOVER); | 		                                                         ->getIcon(IconManager::MX_ICON_MOVER); | ||||||
|  | 		$mxIconGreen      = $this->maniaControl->manialinkManager->getIconManager() | ||||||
|  | 		                                                         ->getIcon(IconManager::MX_ICON_GREEN); | ||||||
|  | 		$mxIconGreenHover = $this->maniaControl->manialinkManager->getIconManager() | ||||||
|  | 		                                                         ->getIcon(IconManager::MX_ICON_GREEN_MOVER); | ||||||
|  |  | ||||||
| 		foreach ($mapList as $map) { | 		foreach ($mapList as $map) { | ||||||
| 			/** @var Map $map */ | 			/** @var Map $map */ | ||||||
| @@ -332,7 +346,8 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 				$label->setTextColor('fff'); | 				$label->setTextColor('fff'); | ||||||
|  |  | ||||||
| 				// Checks if the Player who opened the Widget has queued the map | 				// Checks if the Player who opened the Widget has queued the map | ||||||
| 				$queuer = $this->maniaControl->mapManager->mapQueue->getQueuer($map->uid); | 				$queuer = $this->maniaControl->mapManager->getMapQueue() | ||||||
|  | 				                                         ->getQueuer($map->uid); | ||||||
| 				if ($queuer->login == $player->login) { | 				if ($queuer->login == $player->login) { | ||||||
| 					$description = 'Remove $<' . $map->name . '$> from the Map Queue'; | 					$description = 'Remove $<' . $map->name . '$> from the Map Queue'; | ||||||
| 					$label->addTooltipLabelFeature($descriptionLabel, $description); | 					$label->addTooltipLabelFeature($descriptionLabel, $description); | ||||||
| @@ -520,9 +535,12 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 		// TODO: get rid of the confirm frame to decrease xml size & network usage | 		// TODO: get rid of the confirm frame to decrease xml size & network usage | ||||||
| 		// SUGGESTION: just send them as own manialink again on clicking? | 		// SUGGESTION: just send them as own manialink again on clicking? | ||||||
|  |  | ||||||
| 		$width        = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width        = $this->maniaControl->manialinkManager->getStyleManager() | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowStyle(); | 		                                                     ->getListWidgetsWidth(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowSubStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager() | ||||||
|  | 		                                                     ->getDefaultMainWindowStyle(); | ||||||
|  | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager() | ||||||
|  | 		                                                     ->getDefaultMainWindowSubStyle(); | ||||||
|  |  | ||||||
| 		$confirmFrame = new Frame(); | 		$confirmFrame = new Frame(); | ||||||
| 		$maniaLink->add($confirmFrame); | 		$maniaLink->add($confirmFrame); | ||||||
| @@ -615,7 +633,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_SWITCH_MAP: | 			case self::ACTION_SWITCH_MAP: | ||||||
| 				// Don't queue on Map-Change | 				// Don't queue on Map-Change | ||||||
| 				$this->maniaControl->mapManager->mapQueue->dontQueueNextMapChange(); | 				$this->maniaControl->mapManager->getMapQueue()->dontQueueNextMapChange(); | ||||||
| 				try { | 				try { | ||||||
| 					$this->maniaControl->client->jumpToMapIdent($mapUid); | 					$this->maniaControl->client->jumpToMapIdent($mapUid); | ||||||
| 				} catch (NextMapException $exception) { | 				} catch (NextMapException $exception) { | ||||||
| @@ -649,7 +667,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 					$votesPlugin->undefineVote('switchmap'); | 					$votesPlugin->undefineVote('switchmap'); | ||||||
|  |  | ||||||
| 					//Don't queue on Map-Change | 					//Don't queue on Map-Change | ||||||
| 					$this->maniaControl->mapManager->mapQueue->dontQueueNextMapChange(); | 					$this->maniaControl->mapManager->getMapQueue()->dontQueueNextMapChange(); | ||||||
|  |  | ||||||
| 					try { | 					try { | ||||||
| 						$this->maniaControl->client->JumpToMapIdent($map->uid); | 						$this->maniaControl->client->JumpToMapIdent($map->uid); | ||||||
| @@ -666,11 +684,13 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { | |||||||
| 				}); | 				}); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_QUEUED_MAP: | 			case self::ACTION_QUEUED_MAP: | ||||||
| 				$this->maniaControl->mapManager->mapQueue->addMapToMapQueue($callback[1][1], $mapUid); | 				$this->maniaControl->mapManager->getMapQueue() | ||||||
|  | 				                               ->addMapToMapQueue($callback[1][1], $mapUid); | ||||||
| 				$this->showMapList($player); | 				$this->showMapList($player); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_UNQUEUE_MAP: | 			case self::ACTION_UNQUEUE_MAP: | ||||||
| 				$this->maniaControl->mapManager->mapQueue->removeFromMapQueue($player, $mapUid); | 				$this->maniaControl->mapManager->getMapQueue() | ||||||
|  | 				                               ->removeFromMapQueue($player, $mapUid); | ||||||
| 				$this->showMapList($player); | 				$this->showMapList($player); | ||||||
| 				break; | 				break; | ||||||
| 			default: | 			default: | ||||||
|   | |||||||
| @@ -51,18 +51,25 @@ class MapManager implements CallbackListener { | |||||||
| 	 * Public properties | 	 * Public properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var MapQueue $mapQueue */ | 	/** @var MapQueue $mapQueue */ | ||||||
|  | 	/** @deprecated see getMapQueue() */ | ||||||
| 	public $mapQueue = null; | 	public $mapQueue = null; | ||||||
| 	/** @var MapCommands $mapCommands */ | 	/** @var MapCommands $mapCommands */ | ||||||
|  | 	/** @deprecated see getMapCommands() */ | ||||||
| 	public $mapCommands = null; | 	public $mapCommands = null; | ||||||
| 	/** @var MapActions $mapActions */ | 	/** @var MapActions $mapActions */ | ||||||
|  | 	/** @deprecated see getMapActions() */ | ||||||
| 	public $mapActions = null; | 	public $mapActions = null; | ||||||
| 	/** @var MapList $mapList */ | 	/** @var MapList $mapList */ | ||||||
|  | 	/** @deprecated see getMapList() */ | ||||||
| 	public $mapList = null; | 	public $mapList = null; | ||||||
| 	/** @var DirectoryBrowser $directoryBrowser */ | 	/** @var DirectoryBrowser $directoryBrowser */ | ||||||
|  | 	/** @deprecated see getDirectoryBrowser() */ | ||||||
| 	public $directoryBrowser = null; | 	public $directoryBrowser = null; | ||||||
| 	/** @var ManiaExchangeList $mxList */ | 	/** @var ManiaExchangeList $mxList */ | ||||||
|  | 	/** @deprecated see getMXList() */ | ||||||
| 	public $mxList = null; | 	public $mxList = null; | ||||||
| 	/** @var ManiaExchangeManager $mxManager */ | 	/** @var ManiaExchangeManager $mxManager */ | ||||||
|  | 	/** @deprecated see getMXManager() */ | ||||||
| 	public $mxManager = null; | 	public $mxManager = null; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| @@ -275,10 +282,10 @@ class MapManager implements CallbackListener { | |||||||
| 		$map = $this->maps[$uid]; | 		$map = $this->maps[$uid]; | ||||||
|  |  | ||||||
| 		// Unset the Map everywhere | 		// Unset the Map everywhere | ||||||
| 		$this->mapQueue->removeFromMapQueue($admin, $map->uid); | 		$this->getMapQueue()->removeFromMapQueue($admin, $map->uid); | ||||||
|  |  | ||||||
| 		if ($map->mx) { | 		if ($map->mx) { | ||||||
| 			$this->mxManager->unsetMap($map->mx->id); | 			$this->getMXManager()->unsetMap($map->mx->id); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		// Remove map | 		// Remove map | ||||||
| @@ -323,7 +330,7 @@ class MapManager implements CallbackListener { | |||||||
| 	public function addMapFromMx($mapId, $login, $update = false) { | 	public function addMapFromMx($mapId, $login, $update = false) { | ||||||
| 		if (is_numeric($mapId)) { | 		if (is_numeric($mapId)) { | ||||||
| 			// Check if map exists | 			// Check if map exists | ||||||
| 			$this->maniaControl->mapManager->mxManager->fetchMapInfo($mapId, function (MXMapInfo $mapInfo = null) use ( | 			$this->maniaControl->mapManager->getMXManager()->fetchMapInfo($mapId, function (MXMapInfo $mapInfo = null) use ( | ||||||
| 				&$login, &$update | 				&$login, &$update | ||||||
| 			) { | 			) { | ||||||
| 				if (!$mapInfo || !isset($mapInfo->uploaded)) { | 				if (!$mapInfo || !isset($mapInfo->uploaded)) { | ||||||
| @@ -369,7 +376,8 @@ class MapManager implements CallbackListener { | |||||||
|  |  | ||||||
| 		$downloadFolderName  = $this->maniaControl->settingManager->getSettingValue($this, 'MapDownloadDirectory', 'MX'); | 		$downloadFolderName  = $this->maniaControl->settingManager->getSettingValue($this, 'MapDownloadDirectory', 'MX'); | ||||||
| 		$relativeMapFileName = $downloadFolderName . DIRECTORY_SEPARATOR . $fileName; | 		$relativeMapFileName = $downloadFolderName . DIRECTORY_SEPARATOR . $fileName; | ||||||
| 		$mapDir              = $this->maniaControl->server->directory->getMapsFolder(); | 		$mapDir              = $this->maniaControl->server->getDirectory() | ||||||
|  | 		                                                  ->getMapsFolder(); | ||||||
| 		$downloadDirectory   = $mapDir . $downloadFolderName . DIRECTORY_SEPARATOR; | 		$downloadDirectory   = $mapDir . $downloadFolderName . DIRECTORY_SEPARATOR; | ||||||
| 		$fullMapFileName     = $downloadDirectory . $fileName; | 		$fullMapFileName     = $downloadDirectory . $fileName; | ||||||
|  |  | ||||||
| @@ -421,7 +429,7 @@ class MapManager implements CallbackListener { | |||||||
| 		$this->updateFullMapList(); | 		$this->updateFullMapList(); | ||||||
|  |  | ||||||
| 		// Update Mx MapInfo | 		// Update Mx MapInfo | ||||||
| 		$this->maniaControl->mapManager->mxManager->updateMapObjectsWithManiaExchangeIds(array($mapInfo)); | 		$this->maniaControl->mapManager->getMXManager()->updateMapObjectsWithManiaExchangeIds(array($mapInfo)); | ||||||
|  |  | ||||||
| 		// Update last updated time | 		// Update last updated time | ||||||
| 		$map = $this->getMapByUid($mapInfo->uid); | 		$map = $this->getMapByUid($mapInfo->uid); | ||||||
| @@ -441,7 +449,7 @@ class MapManager implements CallbackListener { | |||||||
| 			$this->maniaControl->chat->sendSuccess($message); | 			$this->maniaControl->chat->sendSuccess($message); | ||||||
| 			$this->maniaControl->log($message, true); | 			$this->maniaControl->log($message, true); | ||||||
| 			// Queue requested Map | 			// Queue requested Map | ||||||
| 			$this->maniaControl->mapManager->mapQueue->addMapToMapQueue($login, $mapInfo->uid); | 			$this->maniaControl->mapManager->getMapQueue()->addMapToMapQueue($login, $mapInfo->uid); | ||||||
| 		} else { | 		} else { | ||||||
| 			$message = '$<' . $player->nickname . '$> updated $<' . $mapInfo->name . '$>!'; | 			$message = '$<' . $player->nickname . '$> updated $<' . $mapInfo->name . '$>!'; | ||||||
| 			$this->maniaControl->chat->sendSuccess($message); | 			$this->maniaControl->chat->sendSuccess($message); | ||||||
| @@ -721,7 +729,7 @@ class MapManager implements CallbackListener { | |||||||
| 	 */ | 	 */ | ||||||
| 	public function handleAfterInit() { | 	public function handleAfterInit() { | ||||||
| 		// Fetch MX infos | 		// Fetch MX infos | ||||||
| 		$this->mxManager->fetchManiaExchangeMapInformation(); | 		$this->getMXManager()->fetchManiaExchangeMapInformation(); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -766,7 +774,7 @@ class MapManager implements CallbackListener { | |||||||
| 		$this->restructureMapList(); | 		$this->restructureMapList(); | ||||||
|  |  | ||||||
| 		// Update the mx of the map (for update checks, etc.) | 		// Update the mx of the map (for update checks, etc.) | ||||||
| 		$this->mxManager->fetchManiaExchangeMapInformation($this->currentMap); | 		$this->getMXManager()->fetchManiaExchangeMapInformation($this->currentMap); | ||||||
|  |  | ||||||
| 		// Trigger own BeginMap callback | 		// Trigger own BeginMap callback | ||||||
| 		$this->maniaControl->callbackManager->triggerCallback(Callbacks::BEGINMAP, $this->currentMap); | 		$this->maniaControl->callbackManager->triggerCallback(Callbacks::BEGINMAP, $this->currentMap); | ||||||
|   | |||||||
| @@ -38,6 +38,7 @@ class MapQueue implements CallbackListener, CommandListener { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $queuedMaps = array(); | 	private $queuedMaps = array(); | ||||||
| 	private $nextMap = null; | 	private $nextMap = null; | ||||||
| @@ -192,7 +193,7 @@ class MapQueue implements CallbackListener, CommandListener { | |||||||
| 			array_push($maps, $queuedMap[1]); | 			array_push($maps, $queuedMap[1]); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		$this->maniaControl->mapManager->mapList->showMapList($player, $maps); | 		$this->maniaControl->mapManager->getMapList()->showMapList($player, $maps); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -61,8 +61,9 @@ class Player { | |||||||
| 	public $currentTargetId = 0; | 	public $currentTargetId = 0; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $cache = array(); | 	private $cache = array(); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -48,8 +48,9 @@ class PlayerActions { | |||||||
| 	const SETTING_PERMISSION_BAN_PLAYER        = 'Ban Player'; | 	const SETTING_PERMISSION_BAN_PLAYER        = 'Ban Player'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -302,8 +303,8 @@ class PlayerActions { | |||||||
| 		// Build Manialink | 		// Build Manialink | ||||||
| 		$width        = 80; | 		$width        = 80; | ||||||
| 		$height       = 50; | 		$height       = 50; | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowSubStyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowSubStyle(); | ||||||
|  |  | ||||||
| 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | ||||||
| 		$frame     = new Frame(); | 		$frame     = new Frame(); | ||||||
|   | |||||||
| @@ -30,8 +30,9 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca | |||||||
| 	const SETTING_PERMISSION_TEAM_BALANCE = 'Balance Teams'; | 	const SETTING_PERMISSION_TEAM_BALANCE = 'Balance Teams'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -133,7 +134,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca | |||||||
| 		if (isset($params[2])) { | 		if (isset($params[2])) { | ||||||
| 			$message = $params[2]; | 			$message = $params[2]; | ||||||
| 		} | 		} | ||||||
| 		$this->maniaControl->playerManager->playerActions->kickPlayer($player->login, $targetLogin, $message); | 		$this->maniaControl->playerManager->getPlayerActions()->kickPlayer($player->login, $targetLogin, $message); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -157,7 +158,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca | |||||||
| 		if (isset($params[2])) { | 		if (isset($params[2])) { | ||||||
| 			$message = $params[2]; | 			$message = $params[2]; | ||||||
| 		} | 		} | ||||||
| 		$this->maniaControl->playerManager->playerActions->banPlayer($player->login, $targetLogin, $message); | 		$this->maniaControl->playerManager->getPlayerActions()->banPlayer($player->login, $targetLogin, $message); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -173,7 +174,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca | |||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 		$targetLogin = $params[1]; | 		$targetLogin = $params[1]; | ||||||
| 		$this->maniaControl->playerManager->playerActions->warnPlayer($player->login, $targetLogin); | 		$this->maniaControl->playerManager->getPlayerActions()->warnPlayer($player->login, $targetLogin); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -196,9 +197,9 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca | |||||||
|  |  | ||||||
| 		if (isset($params[2]) && is_numeric($params[2])) { | 		if (isset($params[2]) && is_numeric($params[2])) { | ||||||
| 			$type = (int)$params[2]; | 			$type = (int)$params[2]; | ||||||
| 			$this->maniaControl->playerManager->playerActions->forcePlayerToSpectator($player->login, $targetLogin, $type); | 			$this->maniaControl->playerManager->getPlayerActions()->forcePlayerToSpectator($player->login, $targetLogin, $type); | ||||||
| 		} else { | 		} else { | ||||||
| 			$this->maniaControl->playerManager->playerActions->forcePlayerToSpectator($player->login, $targetLogin); | 			$this->maniaControl->playerManager->getPlayerActions()->forcePlayerToSpectator($player->login, $targetLogin); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @@ -226,7 +227,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca | |||||||
| 		} | 		} | ||||||
| 		$selectable = ($type === 2); | 		$selectable = ($type === 2); | ||||||
|  |  | ||||||
| 		$this->maniaControl->playerManager->playerActions->forcePlayerToPlay($player->login, $targetLogin, $selectable); | 		$this->maniaControl->playerManager->getPlayerActions()->forcePlayerToPlay($player->login, $targetLogin, $selectable); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -247,7 +248,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca | |||||||
| 		} | 		} | ||||||
| 		$targetLogin = $params[1]; | 		$targetLogin = $params[1]; | ||||||
|  |  | ||||||
| 		$this->maniaControl->playerManager->playerActions->forcePlayerToTeam($player->login, $targetLogin, PlayerActions::TEAM_BLUE); | 		$this->maniaControl->playerManager->getPlayerActions()->forcePlayerToTeam($player->login, $targetLogin, PlayerActions::TEAM_BLUE); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -268,7 +269,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca | |||||||
| 		} | 		} | ||||||
| 		$targetLogin = $params[1]; | 		$targetLogin = $params[1]; | ||||||
|  |  | ||||||
| 		$this->maniaControl->playerManager->playerActions->forcePlayerToTeam($player->login, $targetLogin, PlayerActions::TEAM_RED); | 		$this->maniaControl->playerManager->getPlayerActions()->forcePlayerToTeam($player->login, $targetLogin, PlayerActions::TEAM_RED); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -326,7 +327,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca | |||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 		$targetLogin = $commandParts[1]; | 		$targetLogin = $commandParts[1]; | ||||||
| 		$this->maniaControl->playerManager->playerActions->mutePlayer($admin->login, $targetLogin); | 		$this->maniaControl->playerManager->getPlayerActions()->mutePlayer($admin->login, $targetLogin); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -342,7 +343,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca | |||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 		$targetLogin = $commandParts[1]; | 		$targetLogin = $commandParts[1]; | ||||||
| 		$this->maniaControl->playerManager->playerActions->unMutePlayer($admin->login, $targetLogin); | 		$this->maniaControl->playerManager->getPlayerActions()->unMutePlayer($admin->login, $targetLogin); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -352,7 +353,7 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener, Ca | |||||||
| 	 * @param Player $player | 	 * @param Player $player | ||||||
| 	 */ | 	 */ | ||||||
| 	public function command_playerList(array $chatCallback, Player $player) { | 	public function command_playerList(array $chatCallback, Player $player) { | ||||||
| 		$this->maniaControl->playerManager->playerList->addPlayerToShownList($player, PlayerList::SHOWN_MAIN_WINDOW); | 		$this->maniaControl->playerManager->getPlayerList()->addPlayerToShownList($player, PlayerList::SHOWN_MAIN_WINDOW); | ||||||
| 		$this->maniaControl->playerManager->playerList->showPlayerList($player); | 		$this->maniaControl->playerManager->getPlayerList()->showPlayerList($player); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|   | |||||||
| @@ -21,12 +21,13 @@ class PlayerDataManager { | |||||||
| 	const TYPE_REAL                = 'real'; | 	const TYPE_REAL                = 'real'; | ||||||
| 	const TYPE_BOOL                = 'bool'; | 	const TYPE_BOOL                = 'bool'; | ||||||
| 	const TYPE_ARRAY               = 'array'; | 	const TYPE_ARRAY               = 'array'; | ||||||
|  | 	const ARRAY_DELIMITER          = ';;'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $arrayDelimiter = ';;'; |  | ||||||
| 	private $metaData = array(); | 	private $metaData = array(); | ||||||
| 	private $storedData = array(); | 	private $storedData = array(); | ||||||
|  |  | ||||||
| @@ -339,7 +340,7 @@ class PlayerDataManager { | |||||||
| 			return (string)$value; | 			return (string)$value; | ||||||
| 		} | 		} | ||||||
| 		if ($type === self::TYPE_ARRAY) { | 		if ($type === self::TYPE_ARRAY) { | ||||||
| 			return explode($this->arrayDelimiter, $value); | 			return explode(self::ARRAY_DELIMITER, $value); | ||||||
| 		} | 		} | ||||||
| 		trigger_error('Unsupported data type. ' . print_r($type, true)); | 		trigger_error('Unsupported data type. ' . print_r($type, true)); | ||||||
| 		return $value; | 		return $value; | ||||||
|   | |||||||
| @@ -28,8 +28,9 @@ class PlayerDetailed { | |||||||
| 	const STATS_PER_COLUMN = 13; | 	const STATS_PER_COLUMN = 13; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -41,10 +42,10 @@ class PlayerDetailed { | |||||||
| 		$this->maniaControl = $maniaControl; | 		$this->maniaControl = $maniaControl; | ||||||
|  |  | ||||||
| 		// settings | 		// settings | ||||||
| 		$this->width        = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$this->width        = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$this->height       = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$this->height       = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
| 		$this->quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowStyle(); | 		$this->quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowStyle(); | ||||||
| 		$this->quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowSubStyle(); | 		$this->quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowSubStyle(); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| @@ -62,7 +63,7 @@ class PlayerDetailed { | |||||||
| 		$script    = $maniaLink->getScript(); | 		$script    = $maniaLink->getScript(); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| 		$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script); | 		$frame = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultListFrame($script); | ||||||
| 		$maniaLink->add($frame); | 		$maniaLink->add($frame); | ||||||
|  |  | ||||||
| 		// Create script and features | 		// Create script and features | ||||||
|   | |||||||
| @@ -59,8 +59,9 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer | |||||||
| 	const MAX_PLAYERS_PER_PAGE        = 15; | 	const MAX_PLAYERS_PER_PAGE        = 15; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $playersListShown = array(); | 	private $playersListShown = array(); | ||||||
|  |  | ||||||
| @@ -133,8 +134,8 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer | |||||||
| 	 * @param Player $player | 	 * @param Player $player | ||||||
| 	 */ | 	 */ | ||||||
| 	public function showPlayerList(Player $player) { | 	public function showPlayerList(Player $player) { | ||||||
| 		$width  = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width  = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$height = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
|  |  | ||||||
| 		// get PlayerList | 		// get PlayerList | ||||||
| 		$players = $this->maniaControl->playerManager->getPlayers(); | 		$players = $this->maniaControl->playerManager->getPlayers(); | ||||||
| @@ -146,7 +147,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer | |||||||
| 		$script->addFeature($paging); | 		$script->addFeature($paging); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| 		$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script, $paging); | 		$frame = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultListFrame($script, $paging); | ||||||
| 		$maniaLink->add($frame); | 		$maniaLink->add($frame); | ||||||
|  |  | ||||||
| 		// Start offsets | 		// Start offsets | ||||||
| @@ -154,7 +155,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer | |||||||
| 		$posY = $height / 2; | 		$posY = $height / 2; | ||||||
|  |  | ||||||
| 		// Predefine Description Label | 		// Predefine Description Label | ||||||
| 		$descriptionLabel = $this->maniaControl->manialinkManager->styleManager->getDefaultDescriptionLabel(); | 		$descriptionLabel = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultDescriptionLabel(); | ||||||
| 		$frame->add($descriptionLabel); | 		$frame->add($descriptionLabel); | ||||||
|  |  | ||||||
| 		// Headline | 		// Headline | ||||||
| @@ -425,10 +426,10 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer | |||||||
| 	 */ | 	 */ | ||||||
| 	public function showAdvancedPlayerWidget(Player $admin, $login) { | 	public function showAdvancedPlayerWidget(Player $admin, $login) { | ||||||
| 		$player       = $this->maniaControl->playerManager->getPlayer($login); | 		$player       = $this->maniaControl->playerManager->getPlayer($login); | ||||||
| 		$width        = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width        = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$height       = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height       = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowSubStyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowSubStyle(); | ||||||
|  |  | ||||||
| 		//Settings | 		//Settings | ||||||
| 		$posX      = $width / 2 + 2.5; | 		$posX      = $width / 2 + 2.5; | ||||||
| @@ -505,7 +506,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer | |||||||
| 		$label->setTextSize($textSize); | 		$label->setTextSize($textSize); | ||||||
| 		$label->setTextColor($textColor); | 		$label->setTextColor($textColor); | ||||||
|  |  | ||||||
| 		if (!$this->maniaControl->playerManager->playerActions->isPlayerMuted($login)) { | 		if (!$this->maniaControl->playerManager->getPlayerActions()->isPlayerMuted($login)) { | ||||||
| 			$label->setText('Mute'); | 			$label->setText('Mute'); | ||||||
| 			$quad->setAction(self::ACTION_MUTE_PLAYER . '.' . $login); | 			$quad->setAction(self::ACTION_MUTE_PLAYER . '.' . $login); | ||||||
| 		} else { | 		} else { | ||||||
| @@ -636,53 +637,53 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer | |||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_OPEN_PLAYER_DETAILED: | 			case self::ACTION_OPEN_PLAYER_DETAILED: | ||||||
| 				$player = $this->maniaControl->playerManager->getPlayer($adminLogin); | 				$player = $this->maniaControl->playerManager->getPlayer($adminLogin); | ||||||
| 				$this->maniaControl->playerManager->playerDetailed->showPlayerDetailed($player, $targetLogin); | 				$this->maniaControl->playerManager->getPlayerDetailed()->showPlayerDetailed($player, $targetLogin); | ||||||
| 				unset($this->playersListShown[$player->login]); | 				unset($this->playersListShown[$player->login]); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_FORCE_BLUE: | 			case self::ACTION_FORCE_BLUE: | ||||||
| 				$this->maniaControl->playerManager->playerActions->forcePlayerToTeam($adminLogin, $targetLogin, PlayerActions::TEAM_BLUE); | 				$this->maniaControl->playerManager->getPlayerActions()->forcePlayerToTeam($adminLogin, $targetLogin, PlayerActions::TEAM_BLUE); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_FORCE_RED: | 			case self::ACTION_FORCE_RED: | ||||||
| 				$this->maniaControl->playerManager->playerActions->forcePlayerToTeam($adminLogin, $targetLogin, PlayerActions::TEAM_RED); | 				$this->maniaControl->playerManager->getPlayerActions()->forcePlayerToTeam($adminLogin, $targetLogin, PlayerActions::TEAM_RED); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_FORCE_SPEC: | 			case self::ACTION_FORCE_SPEC: | ||||||
| 				$this->maniaControl->playerManager->playerActions->forcePlayerToSpectator($adminLogin, $targetLogin, PlayerActions::SPECTATOR_BUT_KEEP_SELECTABLE); | 				$this->maniaControl->playerManager->getPlayerActions()->forcePlayerToSpectator($adminLogin, $targetLogin, PlayerActions::SPECTATOR_BUT_KEEP_SELECTABLE); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_FORCE_PLAY: | 			case self::ACTION_FORCE_PLAY: | ||||||
| 				$this->maniaControl->playerManager->playerActions->forcePlayerToPlay($adminLogin, $targetLogin); | 				$this->maniaControl->playerManager->getPlayerActions()->forcePlayerToPlay($adminLogin, $targetLogin); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_MUTE_PLAYER: | 			case self::ACTION_MUTE_PLAYER: | ||||||
| 				$this->maniaControl->playerManager->playerActions->mutePlayer($adminLogin, $targetLogin); | 				$this->maniaControl->playerManager->getPlayerActions()->mutePlayer($adminLogin, $targetLogin); | ||||||
| 				$this->showPlayerList($this->maniaControl->playerManager->getPlayer($adminLogin)); | 				$this->showPlayerList($this->maniaControl->playerManager->getPlayer($adminLogin)); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_UNMUTE_PLAYER: | 			case self::ACTION_UNMUTE_PLAYER: | ||||||
| 				$this->maniaControl->playerManager->playerActions->unMutePlayer($adminLogin, $targetLogin); | 				$this->maniaControl->playerManager->getPlayerActions()->unMutePlayer($adminLogin, $targetLogin); | ||||||
| 				$this->showPlayerList($this->maniaControl->playerManager->getPlayer($adminLogin)); | 				$this->showPlayerList($this->maniaControl->playerManager->getPlayer($adminLogin)); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_WARN_PLAYER: | 			case self::ACTION_WARN_PLAYER: | ||||||
| 				$this->maniaControl->playerManager->playerActions->warnPlayer($adminLogin, $targetLogin); | 				$this->maniaControl->playerManager->getPlayerActions()->warnPlayer($adminLogin, $targetLogin); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_KICK_PLAYER: | 			case self::ACTION_KICK_PLAYER: | ||||||
| 				$this->maniaControl->playerManager->playerActions->kickPlayer($adminLogin, $targetLogin); | 				$this->maniaControl->playerManager->getPlayerActions()->kickPlayer($adminLogin, $targetLogin); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_BAN_PLAYER: | 			case self::ACTION_BAN_PLAYER: | ||||||
| 				$this->maniaControl->playerManager->playerActions->banPlayer($adminLogin, $targetLogin); | 				$this->maniaControl->playerManager->getPlayerActions()->banPlayer($adminLogin, $targetLogin); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_PLAYER_ADV: | 			case self::ACTION_PLAYER_ADV: | ||||||
| 				$admin = $this->maniaControl->playerManager->getPlayer($adminLogin); | 				$admin = $this->maniaControl->playerManager->getPlayer($adminLogin); | ||||||
| 				$this->advancedPlayerWidget($admin, $targetLogin); | 				$this->advancedPlayerWidget($admin, $targetLogin); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_ADD_AS_MASTER: | 			case self::ACTION_ADD_AS_MASTER: | ||||||
| 				$this->maniaControl->playerManager->playerActions->grandAuthLevel($adminLogin, $targetLogin, AuthenticationManager::AUTH_LEVEL_SUPERADMIN); | 				$this->maniaControl->playerManager->getPlayerActions()->grandAuthLevel($adminLogin, $targetLogin, AuthenticationManager::AUTH_LEVEL_SUPERADMIN); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_ADD_AS_ADMIN: | 			case self::ACTION_ADD_AS_ADMIN: | ||||||
| 				$this->maniaControl->playerManager->playerActions->grandAuthLevel($adminLogin, $targetLogin, AuthenticationManager::AUTH_LEVEL_ADMIN); | 				$this->maniaControl->playerManager->getPlayerActions()->grandAuthLevel($adminLogin, $targetLogin, AuthenticationManager::AUTH_LEVEL_ADMIN); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_ADD_AS_MOD: | 			case self::ACTION_ADD_AS_MOD: | ||||||
| 				$this->maniaControl->playerManager->playerActions->grandAuthLevel($adminLogin, $targetLogin, AuthenticationManager::AUTH_LEVEL_MODERATOR); | 				$this->maniaControl->playerManager->getPlayerActions()->grandAuthLevel($adminLogin, $targetLogin, AuthenticationManager::AUTH_LEVEL_MODERATOR); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_REVOKE_RIGHTS: | 			case self::ACTION_REVOKE_RIGHTS: | ||||||
| 				$this->maniaControl->playerManager->playerActions->revokeAuthLevel($adminLogin, $targetLogin); | 				$this->maniaControl->playerManager->getPlayerActions()->revokeAuthLevel($adminLogin, $targetLogin); | ||||||
| 				break; | 				break; | ||||||
| 			case self::ACTION_FORCE_SPEC_VOTE: | 			case self::ACTION_FORCE_SPEC_VOTE: | ||||||
| 				/** @var $votesPlugin CustomVotesPlugin */ | 				/** @var $votesPlugin CustomVotesPlugin */ | ||||||
|   | |||||||
| @@ -33,17 +33,31 @@ class PlayerManager implements CallbackListener, TimerListener { | |||||||
| 	const STAT_SERVERTIME             = 'Servertime'; | 	const STAT_SERVERTIME             = 'Servertime'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Public Properties | 	 * Public properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var PlayerActions $playerActions */ | ||||||
|  | 	/** @deprecated see getPlayerActions() */ | ||||||
| 	public $playerActions = null; | 	public $playerActions = null; | ||||||
|  | 	/** @var PlayerCommands $playerCommands */ | ||||||
|  | 	/** @deprecated see getPlayerCommands() */ | ||||||
| 	public $playerCommands = null; | 	public $playerCommands = null; | ||||||
|  | 	/** @var PlayerDetailed $playerDetailed */ | ||||||
|  | 	/** @deprecated see getPlayerDetailed() */ | ||||||
| 	public $playerDetailed = null; | 	public $playerDetailed = null; | ||||||
|  | 	/** @var PlayerDataManager $playerDataManager */ | ||||||
|  | 	/** @deprecated see getPlayerDataManager() */ | ||||||
|  | 	public $playerDataManager = null; | ||||||
|  | 	/** @var PlayerList $playerList */ | ||||||
|  | 	/** @deprecated see getPlayerList() */ | ||||||
| 	public $playerList = null; | 	public $playerList = null; | ||||||
|  | 	/** @var AdminLists $adminLists */ | ||||||
|  | 	/** @deprecated see getAdminLists() */ | ||||||
| 	public $adminLists = null; | 	public $adminLists = null; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	/** @var Player[] $players */ | 	/** @var Player[] $players */ | ||||||
| 	private $players = array(); | 	private $players = array(); | ||||||
| @@ -110,6 +124,51 @@ class PlayerManager implements CallbackListener, TimerListener { | |||||||
| 		return true; | 		return true; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Get player actions | ||||||
|  | 	 * | ||||||
|  | 	 * @return PlayerActions | ||||||
|  | 	 */ | ||||||
|  | 	public function getPlayerActions() { | ||||||
|  | 		return $this->playerActions; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Get player commands | ||||||
|  | 	 * | ||||||
|  | 	 * @return PlayerCommands | ||||||
|  | 	 */ | ||||||
|  | 	public function getPlayerCommands() { | ||||||
|  | 		return $this->playerCommands; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Get player detailed | ||||||
|  | 	 * | ||||||
|  | 	 * @return PlayerDetailed | ||||||
|  | 	 */ | ||||||
|  | 	public function getPlayerDetailed() { | ||||||
|  | 		return $this->playerDetailed; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Get player list | ||||||
|  | 	 * | ||||||
|  | 	 * @return PlayerList | ||||||
|  | 	 */ | ||||||
|  | 	public function getPlayerList() { | ||||||
|  | 		return $this->playerList; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Get admin lists | ||||||
|  | 	 * | ||||||
|  | 	 * @return AdminLists | ||||||
|  | 	 */ | ||||||
|  | 	public function getAdminLists() { | ||||||
|  | 		return $this->adminLists; | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Handle OnInit callback | 	 * Handle OnInit callback | ||||||
| 	 */ | 	 */ | ||||||
| @@ -152,7 +211,7 @@ class PlayerManager implements CallbackListener, TimerListener { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Save player in Database and fill up Object Properties | 	 * Save player in database and fill up properties | ||||||
| 	 * | 	 * | ||||||
| 	 * @param Player $player | 	 * @param Player $player | ||||||
| 	 * @return bool | 	 * @return bool | ||||||
| @@ -295,7 +354,7 @@ class PlayerManager implements CallbackListener, TimerListener { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Get the Count of all Player | 	 * Get the count of all Players | ||||||
| 	 * | 	 * | ||||||
| 	 * @param bool $withoutSpectators | 	 * @param bool $withoutSpectators | ||||||
| 	 * @return int | 	 * @return int | ||||||
| @@ -363,7 +422,7 @@ class PlayerManager implements CallbackListener, TimerListener { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Get a Player by Login | 	 * Get a Player by login | ||||||
| 	 * | 	 * | ||||||
| 	 * @param mixed $login | 	 * @param mixed $login | ||||||
| 	 * @param bool  $connectedPlayersOnly | 	 * @param bool  $connectedPlayersOnly | ||||||
| @@ -383,7 +442,7 @@ class PlayerManager implements CallbackListener, TimerListener { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Get a Player from the Database | 	 * Get a Player from the database | ||||||
| 	 * | 	 * | ||||||
| 	 * @param string $playerLogin | 	 * @param string $playerLogin | ||||||
| 	 * @return Player | 	 * @return Player | ||||||
| @@ -427,7 +486,7 @@ class PlayerManager implements CallbackListener, TimerListener { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Gets the Count of all Spectators | 	 * Get the count of all spectators | ||||||
| 	 * | 	 * | ||||||
| 	 * @return int | 	 * @return int | ||||||
| 	 */ | 	 */ | ||||||
| @@ -442,7 +501,7 @@ class PlayerManager implements CallbackListener, TimerListener { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Gets a Player by his Index | 	 * Get a Player by index | ||||||
| 	 * | 	 * | ||||||
| 	 * @param int  $index | 	 * @param int  $index | ||||||
| 	 * @param bool $connectedPlayersOnly | 	 * @param bool $connectedPlayersOnly | ||||||
| @@ -455,27 +514,28 @@ class PlayerManager implements CallbackListener, TimerListener { | |||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		if ($connectedPlayersOnly) { | 		// Player is not online - Get Player from Database | ||||||
| 			return null; | 		if (!$connectedPlayersOnly) { | ||||||
| 		} |  | ||||||
| 		//Player is not online -> get Player from Database |  | ||||||
| 			return $this->getPlayerFromDatabaseByIndex($index); | 			return $this->getPlayerFromDatabaseByIndex($index); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | 		return null; | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Get a Player out of the database | 	 * Get a Player out of the database | ||||||
| 	 * | 	 * | ||||||
| 	 * @param int $playerIndex | 	 * @param int $playerIndex | ||||||
| 	 * @return Player $player | 	 * @return Player | ||||||
| 	 */ | 	 */ | ||||||
| 	private function getPlayerFromDatabaseByIndex($playerIndex) { | 	private function getPlayerFromDatabaseByIndex($playerIndex) { | ||||||
| 		$mysqli = $this->maniaControl->database->mysqli; |  | ||||||
|  |  | ||||||
| 		if (!is_numeric($playerIndex)) { | 		if (!is_numeric($playerIndex)) { | ||||||
| 			return null; | 			return null; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		$query  = "SELECT * FROM `" . self::TABLE_PLAYERS . "` WHERE `index` = " . $playerIndex . ";"; | 		$mysqli = $this->maniaControl->database->mysqli; | ||||||
|  | 		$query  = "SELECT * FROM `" . self::TABLE_PLAYERS . "` | ||||||
|  | 				WHERE `index` = {$playerIndex};"; | ||||||
| 		$result = $mysqli->query($query); | 		$result = $mysqli->query($query); | ||||||
| 		if (!$result) { | 		if (!$result) { | ||||||
| 			trigger_error($mysqli->error); | 			trigger_error($mysqli->error); | ||||||
| @@ -485,7 +545,7 @@ class PlayerManager implements CallbackListener, TimerListener { | |||||||
| 		$row = $result->fetch_object(); | 		$row = $result->fetch_object(); | ||||||
| 		$result->free(); | 		$result->free(); | ||||||
|  |  | ||||||
| 		if (!isset($row)) { | 		if (!$row) { | ||||||
| 			return null; | 			return null; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -34,6 +34,7 @@ class InstallMenu implements ConfiguratorMenu, ManialinkPageAnswerListener { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -26,6 +26,7 @@ class PluginManager { | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	/** @var PluginMenu $pluginMenu */ | 	/** @var PluginMenu $pluginMenu */ | ||||||
| 	private $pluginMenu = null; | 	private $pluginMenu = null; | ||||||
|   | |||||||
| @@ -48,6 +48,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -43,6 +43,7 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $serverShutdownTime = -1; | 	private $serverShutdownTime = -1; | ||||||
| 	private $serverShutdownEmpty = false; | 	private $serverShutdownEmpty = false; | ||||||
|   | |||||||
| @@ -15,9 +15,10 @@ use ManiaControl\ManiaControl; | |||||||
|  * @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 Directory implements CallbackListener { | class Directory implements CallbackListener { | ||||||
| 	/** | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -13,8 +13,9 @@ use ManiaControl\ManiaControl; | |||||||
|  */ |  */ | ||||||
| class ScriptManager { | class ScriptManager { | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $isScriptMode = null; | 	private $isScriptMode = null; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -35,19 +35,25 @@ class Server implements CallbackListener { | |||||||
| 	public $login = null; | 	public $login = null; | ||||||
| 	public $titleId = null; | 	public $titleId = null; | ||||||
| 	/** @var Directory $directory */ | 	/** @var Directory $directory */ | ||||||
|  | 	/** @deprecated see getDirectory() */ | ||||||
| 	public $directory = null; | 	public $directory = null; | ||||||
| 	/** @var Commands $commands */ | 	/** @var Commands $commands */ | ||||||
|  | 	/** @deprecated see getCommands() */ | ||||||
| 	public $commands = null; | 	public $commands = null; | ||||||
| 	/** @var UsageReporter $usageReporter */ | 	/** @var UsageReporter $usageReporter */ | ||||||
|  | 	/** @deprecated see getUsageReporter() */ | ||||||
| 	public $usageReporter = null; | 	public $usageReporter = null; | ||||||
| 	/** @var RankingManager $rankingManager */ | 	/** @var RankingManager $rankingManager */ | ||||||
|  | 	/** @deprecated see getRankingManager() */ | ||||||
| 	public $rankingManager = null; | 	public $rankingManager = null; | ||||||
| 	/** @var ScriptManager $scriptManager */ | 	/** @var ScriptManager $scriptManager */ | ||||||
|  | 	/** @deprecated see getScriptManager() */ | ||||||
| 	public $scriptManager = null; | 	public $scriptManager = null; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $teamMode = null; | 	private $teamMode = null; | ||||||
|  |  | ||||||
| @@ -133,6 +139,15 @@ class Server implements CallbackListener { | |||||||
| 		return $this->usageReporter; | 		return $this->usageReporter; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Return the ranking manager | ||||||
|  | 	 * | ||||||
|  | 	 * @return RankingManager | ||||||
|  | 	 */ | ||||||
|  | 	public function getRankingManager() { | ||||||
|  | 		return $this->rankingManager; | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Return the script manager | 	 * Return the script manager | ||||||
| 	 * | 	 * | ||||||
| @@ -284,7 +299,7 @@ class Server implements CallbackListener { | |||||||
| 	 * @return string | 	 * @return string | ||||||
| 	 */ | 	 */ | ||||||
| 	public function getGhostReplay($login) { | 	public function getGhostReplay($login) { | ||||||
| 		$dataDir = $this->directory->getGameDataFolder(); | 		$dataDir = $this->getDirectory()->getGameDataFolder(); | ||||||
| 		if (!$this->checkAccess($dataDir)) { | 		if (!$this->checkAccess($dataDir)) { | ||||||
| 			return null; | 			return null; | ||||||
| 		} | 		} | ||||||
|   | |||||||
| @@ -46,6 +46,7 @@ class ServerOptionsMenu implements CallbackListener, ConfiguratorMenu, TimerList | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -22,8 +22,9 @@ class UsageReporter implements TimerListener { | |||||||
| 	const SETTING_REPORT_USAGE = 'Report Usage to $lManiaControl.com$l'; | 	const SETTING_REPORT_USAGE = 'Report Usage to $lManiaControl.com$l'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -31,6 +31,7 @@ class VoteRatiosMenu implements CallbackListener, ConfiguratorMenu, TimerListene | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -36,8 +36,9 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener, | |||||||
| 	const ACTION_SORT_STATS     = 'SimpleStatsList.SortStats'; | 	const ACTION_SORT_STATS     = 'SimpleStatsList.SortStats'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $statArray = array(); | 	private $statArray = array(); | ||||||
| 	private $statsWidth = 0; | 	private $statsWidth = 0; | ||||||
| @@ -118,9 +119,9 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener, | |||||||
| 	 * @param string $order | 	 * @param string $order | ||||||
| 	 */ | 	 */ | ||||||
| 	public function showStatsList(Player $player, $order = PlayerManager::STAT_SERVERTIME) { | 	public function showStatsList(Player $player, $order = PlayerManager::STAT_SERVERTIME) { | ||||||
| 		$height       = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height       = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowSubStyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowSubStyle(); | ||||||
|  |  | ||||||
|  |  | ||||||
| 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | ||||||
|   | |||||||
| @@ -53,8 +53,9 @@ class StatisticCollector implements CallbackListener { | |||||||
| 	const WEAPON_ARROW   = 5; | 	const WEAPON_ARROW   = 5; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $onShootArray = array(); | 	private $onShootArray = array(); | ||||||
|  |  | ||||||
| @@ -114,7 +115,7 @@ class StatisticCollector implements CallbackListener { | |||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		$leaders = $this->maniaControl->server->rankingManager->getLeaders(); | 		$leaders = $this->maniaControl->server->getRankingManager()->getLeaders(); | ||||||
|  |  | ||||||
| 		foreach ($leaders as $leaderLogin) { | 		foreach ($leaders as $leaderLogin) { | ||||||
| 			$leader = $this->maniaControl->playerManager->getPlayer($leaderLogin); | 			$leader = $this->maniaControl->playerManager->getPlayer($leaderLogin); | ||||||
|   | |||||||
| @@ -30,22 +30,27 @@ class StatisticManager { | |||||||
| 	const SPECIAL_STAT_ARROW_ACC   = 'Arrow Accuracy'; | 	const SPECIAL_STAT_ARROW_ACC   = 'Arrow Accuracy'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Public Properties | 	 * Public properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var StatisticCollector $statisticCollector */ | ||||||
|  | 	/** @deprecated see getStatisticCollector() */ | ||||||
| 	public $statisticCollector = null; | 	public $statisticCollector = null; | ||||||
|  | 	/** @var SimpleStatsList $simpleStatsList */ | ||||||
|  | 	/** @deprecated see getSimpleStatsList() */ | ||||||
| 	public $simpleStatsList = null; | 	public $simpleStatsList = null; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $stats = array(); | 	private $stats = array(); | ||||||
| 	private $specialStats = array(); | 	private $specialStats = array(); | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Construct player manager | 	 * Construct a new statistic manager instance | ||||||
| 	 * | 	 * | ||||||
| 	 * @param \ManiaControl\ManiaControl $maniaControl | 	 * @param ManiaControl $maniaControl | ||||||
| 	 */ | 	 */ | ||||||
| 	public function __construct(ManiaControl $maniaControl) { | 	public function __construct(ManiaControl $maniaControl) { | ||||||
| 		$this->maniaControl = $maniaControl; | 		$this->maniaControl = $maniaControl; | ||||||
| @@ -165,6 +170,24 @@ class StatisticManager { | |||||||
| 		$this->specialStats[self::SPECIAL_STAT_ROCKET_ACC] = $stat; | 		$this->specialStats[self::SPECIAL_STAT_ROCKET_ACC] = $stat; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Return the statistic collector | ||||||
|  | 	 * | ||||||
|  | 	 * @return StatisticCollector | ||||||
|  | 	 */ | ||||||
|  | 	public function getStatisticCollector() { | ||||||
|  | 		return $this->statisticCollector; | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	/** | ||||||
|  | 	 * Return the simple stats list | ||||||
|  | 	 * | ||||||
|  | 	 * @return SimpleStatsList | ||||||
|  | 	 */ | ||||||
|  | 	public function getSimpleStatsList() { | ||||||
|  | 		return $this->simpleStatsList; | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
| 	 * Get All statistics ordered by an given name | 	 * Get All statistics ordered by an given name | ||||||
| 	 * | 	 * | ||||||
|   | |||||||
| @@ -27,6 +27,7 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis | |||||||
| 	/* | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
|  | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ class ChatMessagePlugin implements CommandListener, Plugin { | |||||||
| 	const SETTING_AFK_FORCE_SPEC = 'AFK command forces spec'; | 	const SETTING_AFK_FORCE_SPEC = 'AFK command forces spec'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var ManiaControl $maniaControl */ | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|   | |||||||
| @@ -76,9 +76,9 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP | |||||||
| 	const CB_CUSTOM_VOTE_FINISHED = 'CustomVotesPlugin.CustomVoteFinished'; | 	const CB_CUSTOM_VOTE_FINISHED = 'CustomVotesPlugin.CustomVoteFinished'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var maniaControl $maniaControl */ | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| 	private $voteCommands = array(); | 	private $voteCommands = array(); | ||||||
| 	private $voteMenuItems = array(); | 	private $voteMenuItems = array(); | ||||||
| @@ -289,9 +289,9 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP | |||||||
| 		$posY              = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_VOTE_ICON_POSY); | 		$posY              = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_VOTE_ICON_POSY); | ||||||
| 		$width             = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_VOTE_ICON_WIDTH); | 		$width             = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_VOTE_ICON_WIDTH); | ||||||
| 		$height            = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_VOTE_ICON_HEIGHT); | 		$height            = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_VOTE_ICON_HEIGHT); | ||||||
| 		$shootManiaOffset  = $this->maniaControl->manialinkManager->styleManager->getDefaultIconOffsetSM(); | 		$shootManiaOffset  = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultIconOffsetSM(); | ||||||
| 		$quadStyle         = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle(); | 		$quadStyle         = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadStyle(); | ||||||
| 		$quadSubstyle      = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle(); | 		$quadSubstyle      = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadSubstyle(); | ||||||
| 		$itemMarginFactorX = 1.3; | 		$itemMarginFactorX = 1.3; | ||||||
| 		$itemMarginFactorY = 1.2; | 		$itemMarginFactorY = 1.2; | ||||||
|  |  | ||||||
| @@ -446,7 +446,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP | |||||||
| 	 */ | 	 */ | ||||||
| 	public function startVote(Player $player, $voteIndex, $function = null) { | 	public function startVote(Player $player, $voteIndex, $function = null) { | ||||||
| 		//Player is muted | 		//Player is muted | ||||||
| 		if ($this->maniaControl->playerManager->playerActions->isPlayerMuted($player)) { | 		if ($this->maniaControl->playerManager->getPlayerActions()->isPlayerMuted($player)) { | ||||||
| 			$this->maniaControl->chat->sendError('Muted Players are not allowed to start a vote.', $player->login); | 			$this->maniaControl->chat->sendError('Muted Players are not allowed to start a vote.', $player->login); | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| @@ -530,7 +530,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP | |||||||
| 				case 'skip': | 				case 'skip': | ||||||
| 				case 'nextmap': | 				case 'nextmap': | ||||||
| 					try { | 					try { | ||||||
| 						$this->maniaControl->mapManager->mapActions->skipMap(); | 						$this->maniaControl->mapManager->getMapActions()->skipMap(); | ||||||
| 					} catch (ChangeInProgressException $e) { | 					} catch (ChangeInProgressException $e) { | ||||||
| 					} | 					} | ||||||
| 					$this->maniaControl->chat->sendInformation('$f8fVote to $fffskip the Map$f8f has been successful!'); | 					$this->maniaControl->chat->sendInformation('$f8fVote to $fffskip the Map$f8f has been successful!'); | ||||||
| @@ -547,7 +547,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP | |||||||
| 					$this->maniaControl->chat->sendInformation('$f8fVote to $fffpause the current Game$f8f has been successful!'); | 					$this->maniaControl->chat->sendInformation('$f8fVote to $fffpause the current Game$f8f has been successful!'); | ||||||
| 					break; | 					break; | ||||||
| 				case 'replay': | 				case 'replay': | ||||||
| 					$this->maniaControl->mapManager->mapQueue->addFirstMapToMapQueue($this->currentVote->voter, $this->maniaControl->mapManager->getCurrentMap()); | 					$this->maniaControl->mapManager->getMapQueue()->addFirstMapToMapQueue($this->currentVote->voter, $this->maniaControl->mapManager->getCurrentMap()); | ||||||
| 					$this->maniaControl->chat->sendInformation('$f8fVote to $fffreplay the Map$f8f has been successful!'); | 					$this->maniaControl->chat->sendInformation('$f8fVote to $fffreplay the Map$f8f has been successful!'); | ||||||
| 					break; | 					break; | ||||||
| 			} | 			} | ||||||
| @@ -676,9 +676,9 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP | |||||||
| 		$height  = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_HEIGHT); | 		$height  = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_HEIGHT); | ||||||
| 		$maxTime = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_VOTE_TIME); | 		$maxTime = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_VOTE_TIME); | ||||||
|  |  | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadSubstyle(); | ||||||
| 		$labelStyle   = $this->maniaControl->manialinkManager->styleManager->getDefaultLabelStyle(); | 		$labelStyle   = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultLabelStyle(); | ||||||
|  |  | ||||||
| 		$maniaLink = new ManiaLink(self::MLID_WIDGET); | 		$maniaLink = new ManiaLink(self::MLID_WIDGET); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -11,7 +11,7 @@ namespace MCTeam\Dedimania; | |||||||
|  */ |  */ | ||||||
| class DedimaniaPlayer { | class DedimaniaPlayer { | ||||||
| 	/* | 	/* | ||||||
| 	 * Public Properties | 	 * Public properties | ||||||
| 	 */ | 	 */ | ||||||
| 	public $login = ''; | 	public $login = ''; | ||||||
| 	public $maxRank = -1; | 	public $maxRank = -1; | ||||||
|   | |||||||
| @@ -62,7 +62,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene | |||||||
| 	const DEDIMANIA_DEBUG                 = false; | 	const DEDIMANIA_DEBUG                 = false; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var ManiaControl $maniaControl */ | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| @@ -467,9 +467,9 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene | |||||||
| 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_WIDTH); | 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_WIDTH); | ||||||
| 		$lines        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_LINE_COUNT); | 		$lines        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_LINE_COUNT); | ||||||
| 		$lineHeight   = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_LINE_HEIGHT); | 		$lineHeight   = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_LINE_HEIGHT); | ||||||
| 		$labelStyle   = $this->maniaControl->manialinkManager->styleManager->getDefaultLabelStyle(); | 		$labelStyle   = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultLabelStyle(); | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadSubstyle(); | ||||||
|  |  | ||||||
|  |  | ||||||
| 		$manialink = new ManiaLink(self::MLID_DEDIMANIA); | 		$manialink = new ManiaLink(self::MLID_DEDIMANIA); | ||||||
| @@ -1052,7 +1052,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene | |||||||
|  |  | ||||||
| 		// Set ghost replay | 		// Set ghost replay | ||||||
| 		if ($record->rank <= 1) { | 		if ($record->rank <= 1) { | ||||||
| 			$dataDirectory = $this->maniaControl->server->directory->getGameDataFolder(); | 			$dataDirectory = $this->maniaControl->server->getDirectory()->getGameDataFolder(); | ||||||
| 			if (!isset($this->dedimaniaData->directoryAccessChecked)) { | 			if (!isset($this->dedimaniaData->directoryAccessChecked)) { | ||||||
| 				$access = $this->maniaControl->server->checkAccess($dataDirectory); | 				$access = $this->maniaControl->server->checkAccess($dataDirectory); | ||||||
| 				if (!$access) { | 				if (!$access) { | ||||||
| @@ -1092,8 +1092,8 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene | |||||||
| 	 * @param Player $player | 	 * @param Player $player | ||||||
| 	 */ | 	 */ | ||||||
| 	public function showDediRecordsList(array $chat, Player $player) { | 	public function showDediRecordsList(array $chat, Player $player) { | ||||||
| 		$width  = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width  = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$height = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
|  |  | ||||||
| 		// get PlayerList | 		// get PlayerList | ||||||
| 		$records = $this->dedimaniaData->records; | 		$records = $this->dedimaniaData->records; | ||||||
| @@ -1109,7 +1109,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene | |||||||
| 		$script->addFeature($paging); | 		$script->addFeature($paging); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| 		$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script, $paging); | 		$frame = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultListFrame($script, $paging); | ||||||
| 		$maniaLink->add($frame); | 		$maniaLink->add($frame); | ||||||
|  |  | ||||||
| 		// Start offsets | 		// Start offsets | ||||||
| @@ -1117,7 +1117,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene | |||||||
| 		$posY = $height / 2; | 		$posY = $height / 2; | ||||||
|  |  | ||||||
| 		// Predefine Description Label | 		// Predefine Description Label | ||||||
| 		$descriptionLabel = $this->maniaControl->manialinkManager->styleManager->getDefaultDescriptionLabel(); | 		$descriptionLabel = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultDescriptionLabel(); | ||||||
| 		$frame->add($descriptionLabel); | 		$frame->add($descriptionLabel); | ||||||
|  |  | ||||||
| 		// Headline | 		// Headline | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ use ManiaControl\Utils\Formatter; | |||||||
|  */ |  */ | ||||||
| class RecordData { | class RecordData { | ||||||
| 	/* | 	/* | ||||||
| 	 * Public Properties | 	 * Public properties | ||||||
| 	 */ | 	 */ | ||||||
| 	public $nullRecord = false; | 	public $nullRecord = false; | ||||||
| 	public $login = ''; | 	public $login = ''; | ||||||
|   | |||||||
| @@ -51,7 +51,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { | |||||||
| 	const SETTING_MIN_AMOUNT_SHOWN        = 'Minimum Donation amount to get shown'; | 	const SETTING_MIN_AMOUNT_SHOWN        = 'Minimum Donation amount to get shown'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var ManiaControl $maniaControl */ | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| @@ -125,7 +125,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { | |||||||
| 		$this->maniaControl->settingManager->initSetting($this, self::SETTING_MIN_AMOUNT_SHOWN, 100); | 		$this->maniaControl->settingManager->initSetting($this, self::SETTING_MIN_AMOUNT_SHOWN, 100); | ||||||
|  |  | ||||||
| 		// Register Stat in Simple StatsList | 		// Register Stat in Simple StatsList | ||||||
| 		$this->maniaControl->statisticManager->simpleStatsList->registerStat(self::STAT_PLAYER_DONATIONS, 90, "DP", 15); | 		$this->maniaControl->statisticManager->getSimpleStatsList()->registerStat(self::STAT_PLAYER_DONATIONS, 90, "DP", 15); | ||||||
|  |  | ||||||
| 		$this->displayWidget(); | 		$this->displayWidget(); | ||||||
| 		return true; | 		return true; | ||||||
| @@ -151,9 +151,9 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { | |||||||
| 		$width             = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_DONATE_WIDGET_WIDTH); | 		$width             = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_DONATE_WIDGET_WIDTH); | ||||||
| 		$height            = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_DONATE_WIDGET_HEIGHT); | 		$height            = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_DONATE_WIDGET_HEIGHT); | ||||||
| 		$values            = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_DONATION_VALUES); | 		$values            = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_DONATION_VALUES); | ||||||
| 		$shootManiaOffset  = $this->maniaControl->manialinkManager->styleManager->getDefaultIconOffsetSM(); | 		$shootManiaOffset  = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultIconOffsetSM(); | ||||||
| 		$quadStyle         = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle(); | 		$quadStyle         = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadStyle(); | ||||||
| 		$quadSubstyle      = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle(); | 		$quadSubstyle      = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadSubstyle(); | ||||||
| 		$itemMarginFactorX = 1.3; | 		$itemMarginFactorX = 1.3; | ||||||
| 		$itemMarginFactorY = 1.2; | 		$itemMarginFactorY = 1.2; | ||||||
|  |  | ||||||
| @@ -461,8 +461,8 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { | |||||||
| 	private function showTopDonsList(Player $player) { | 	private function showTopDonsList(Player $player) { | ||||||
| 		$stats = $this->maniaControl->statisticManager->getStatsRanking(self::STAT_PLAYER_DONATIONS); | 		$stats = $this->maniaControl->statisticManager->getStatsRanking(self::STAT_PLAYER_DONATIONS); | ||||||
|  |  | ||||||
| 		$width  = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width  = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$height = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
|  |  | ||||||
| 		// create manialink | 		// create manialink | ||||||
| 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | ||||||
| @@ -471,7 +471,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { | |||||||
| 		$script->addFeature($paging); | 		$script->addFeature($paging); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| 		$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script, $paging); | 		$frame = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultListFrame($script, $paging); | ||||||
| 		$maniaLink->add($frame); | 		$maniaLink->add($frame); | ||||||
|  |  | ||||||
| 		// Start offsets | 		// Start offsets | ||||||
| @@ -479,7 +479,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { | |||||||
| 		$posY = $height / 2; | 		$posY = $height / 2; | ||||||
|  |  | ||||||
| 		//Predefine description Label | 		//Predefine description Label | ||||||
| 		$descriptionLabel = $this->maniaControl->manialinkManager->styleManager->getDefaultDescriptionLabel(); | 		$descriptionLabel = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultDescriptionLabel(); | ||||||
| 		$frame->add($descriptionLabel); | 		$frame->add($descriptionLabel); | ||||||
|  |  | ||||||
| 		// Headline | 		// Headline | ||||||
|   | |||||||
| @@ -41,7 +41,7 @@ class DynamicPointLimitPlugin implements CallbackListener, CommandListener, Plug | |||||||
| 	const SCRIPT_SETTING_MAP_POINTS_LIMIT = 'S_MapPointsLimit'; | 	const SCRIPT_SETTING_MAP_POINTS_LIMIT = 'S_MapPointsLimit'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var ManiaControl $maniaControl */ | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
|   | |||||||
| @@ -65,7 +65,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin { | |||||||
| 	const MX_KARMA_GET_MAP_RATING    = 'getMapRating'; | 	const MX_KARMA_GET_MAP_RATING    = 'getMapRating'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var ManiaControl $maniaControl */ | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| @@ -167,7 +167,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin { | |||||||
| 		$this->maniaControl->statisticManager->defineStatMetaData(self::STAT_PLAYER_MAPVOTES); | 		$this->maniaControl->statisticManager->defineStatMetaData(self::STAT_PLAYER_MAPVOTES); | ||||||
|  |  | ||||||
| 		// Register Stat in Simple StatsList | 		// Register Stat in Simple StatsList | ||||||
| 		$this->maniaControl->statisticManager->simpleStatsList->registerStat(self::STAT_PLAYER_MAPVOTES, 100, "VM"); | 		$this->maniaControl->statisticManager->getSimpleStatsList()->registerStat(self::STAT_PLAYER_MAPVOTES, 100, "VM"); | ||||||
|  |  | ||||||
| 		$this->updateManialink = true; | 		$this->updateManialink = true; | ||||||
|  |  | ||||||
| @@ -909,9 +909,9 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin { | |||||||
| 		$posY         = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_POSY); | 		$posY         = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_POSY); | ||||||
| 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_WIDTH); | 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_WIDTH); | ||||||
| 		$height       = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_HEIGHT); | 		$height       = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_HEIGHT); | ||||||
| 		$labelStyle   = $this->maniaControl->manialinkManager->styleManager->getDefaultLabelStyle(); | 		$labelStyle   = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultLabelStyle(); | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadSubstyle(); | ||||||
|  |  | ||||||
| 		$manialink = new ManiaLink(self::MLID_KARMA); | 		$manialink = new ManiaLink(self::MLID_KARMA); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -56,7 +56,7 @@ class LocalRecordsPlugin implements CallbackListener, CommandListener, TimerList | |||||||
| 	const ACTION_SHOW_RECORDSLIST     = 'LocalRecords.ShowRecordsList'; | 	const ACTION_SHOW_RECORDSLIST     = 'LocalRecords.ShowRecordsList'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var ManiaControl $maniaControl */ | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| @@ -217,9 +217,9 @@ class LocalRecordsPlugin implements CallbackListener, CommandListener, TimerList | |||||||
| 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_WIDTH); | 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_WIDTH); | ||||||
| 		$lines        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_LINESCOUNT); | 		$lines        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_LINESCOUNT); | ||||||
| 		$lineHeight   = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_LINEHEIGHT); | 		$lineHeight   = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_WIDGET_LINEHEIGHT); | ||||||
| 		$labelStyle   = $this->maniaControl->manialinkManager->styleManager->getDefaultLabelStyle(); | 		$labelStyle   = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultLabelStyle(); | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadSubstyle(); | ||||||
|  |  | ||||||
| 		$records = $this->getLocalRecords($map); | 		$records = $this->getLocalRecords($map); | ||||||
| 		if (!is_array($records)) { | 		if (!is_array($records)) { | ||||||
| @@ -548,8 +548,8 @@ class LocalRecordsPlugin implements CallbackListener, CommandListener, TimerList | |||||||
| 	 * @param Player $player | 	 * @param Player $player | ||||||
| 	 */ | 	 */ | ||||||
| 	public function showRecordsList(array $chat, Player $player) { | 	public function showRecordsList(array $chat, Player $player) { | ||||||
| 		$width  = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width  = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$height = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
|  |  | ||||||
| 		// get PlayerList | 		// get PlayerList | ||||||
| 		$records = $this->getLocalRecords($this->maniaControl->mapManager->getCurrentMap()); | 		$records = $this->getLocalRecords($this->maniaControl->mapManager->getCurrentMap()); | ||||||
| @@ -561,7 +561,7 @@ class LocalRecordsPlugin implements CallbackListener, CommandListener, TimerList | |||||||
| 		$script->addFeature($paging); | 		$script->addFeature($paging); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| 		$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script, $paging); | 		$frame = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultListFrame($script, $paging); | ||||||
| 		$maniaLink->add($frame); | 		$maniaLink->add($frame); | ||||||
|  |  | ||||||
| 		// Start offsets | 		// Start offsets | ||||||
| @@ -569,7 +569,7 @@ class LocalRecordsPlugin implements CallbackListener, CommandListener, TimerList | |||||||
| 		$posY = $height / 2; | 		$posY = $height / 2; | ||||||
|  |  | ||||||
| 		// Predefine Description Label | 		// Predefine Description Label | ||||||
| 		$descriptionLabel = $this->maniaControl->manialinkManager->styleManager->getDefaultDescriptionLabel(); | 		$descriptionLabel = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultDescriptionLabel(); | ||||||
| 		$frame->add($descriptionLabel); | 		$frame->add($descriptionLabel); | ||||||
|  |  | ||||||
| 		// Headline | 		// Headline | ||||||
|   | |||||||
| @@ -44,8 +44,8 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener { | |||||||
| 	const SETTING_MAX_STORED_RECORDS      = 'Maximum number of records per map for calculations'; | 	const SETTING_MAX_STORED_RECORDS      = 'Maximum number of records per map for calculations'; | ||||||
| 	const CB_RANK_BUILT                   = 'ServerRankingPlugin.RankBuilt'; | 	const CB_RANK_BUILT                   = 'ServerRankingPlugin.RankBuilt'; | ||||||
|  |  | ||||||
| 	/** | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var ManiaControl $maniaControl * */ | 	/** @var ManiaControl $maniaControl * */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| @@ -477,8 +477,8 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener { | |||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		$width  = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width  = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$height = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
|  |  | ||||||
| 		// create manialink | 		// create manialink | ||||||
| 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | ||||||
| @@ -487,7 +487,7 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener { | |||||||
| 		$script->addFeature($paging); | 		$script->addFeature($paging); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| 		$frame = $this->maniaControl->manialinkManager->styleManager->getDefaultListFrame($script, $paging); | 		$frame = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultListFrame($script, $paging); | ||||||
| 		$maniaLink->add($frame); | 		$maniaLink->add($frame); | ||||||
|  |  | ||||||
| 		// Start offsets | 		// Start offsets | ||||||
| @@ -495,7 +495,7 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener { | |||||||
| 		$posY = $height / 2; | 		$posY = $height / 2; | ||||||
|  |  | ||||||
| 		//Predefine description Label | 		//Predefine description Label | ||||||
| 		$descriptionLabel = $this->maniaControl->manialinkManager->styleManager->getDefaultDescriptionLabel(); | 		$descriptionLabel = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultDescriptionLabel(); | ||||||
| 		$frame->add($descriptionLabel); | 		$frame->add($descriptionLabel); | ||||||
|  |  | ||||||
| 		// Headline | 		// Headline | ||||||
|   | |||||||
| @@ -70,7 +70,7 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin { | |||||||
| 	const SETTING_SERVERINFO_WIDGET_HEIGHT    = 'ServerInfo-Widget-Size: Height'; | 	const SETTING_SERVERINFO_WIDGET_HEIGHT    = 'ServerInfo-Widget-Size: Height'; | ||||||
|  |  | ||||||
| 	/* | 	/* | ||||||
| 	 * Private Properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var ManiaControl $maniaControl */ | 	/** @var ManiaControl $maniaControl */ | ||||||
| 	private $maniaControl = null; | 	private $maniaControl = null; | ||||||
| @@ -123,7 +123,7 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin { | |||||||
| 		$this->maniaControl = $maniaControl; | 		$this->maniaControl = $maniaControl; | ||||||
|  |  | ||||||
| 		// Set CustomUI Setting | 		// Set CustomUI Setting | ||||||
| 		$this->maniaControl->manialinkManager->customUIManager->setChallengeInfoVisible(false); | 		$this->maniaControl->manialinkManager->getCustomUIManager()->setChallengeInfoVisible(false); | ||||||
|  |  | ||||||
| 		// Register for callbacks | 		// Register for callbacks | ||||||
| 		$this->maniaControl->callbackManager->registerCallbackListener(Callbacks::BEGINMAP, $this, 'handleOnBeginMap'); | 		$this->maniaControl->callbackManager->registerCallbackListener(Callbacks::BEGINMAP, $this, 'handleOnBeginMap'); | ||||||
| @@ -189,8 +189,8 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin { | |||||||
| 		$posY         = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MAP_WIDGET_POSY); | 		$posY         = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MAP_WIDGET_POSY); | ||||||
| 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MAP_WIDGET_WIDTH); | 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MAP_WIDGET_WIDTH); | ||||||
| 		$height       = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MAP_WIDGET_HEIGHT); | 		$height       = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MAP_WIDGET_HEIGHT); | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadSubstyle(); | ||||||
|  |  | ||||||
| 		$maniaLink = new ManiaLink(self::MLID_MAP_WIDGET); | 		$maniaLink = new ManiaLink(self::MLID_MAP_WIDGET); | ||||||
| 		$script    = new Script(); | 		$script    = new Script(); | ||||||
| @@ -231,8 +231,8 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin { | |||||||
| 		if (isset($map->mx->pageurl)) { | 		if (isset($map->mx->pageurl)) { | ||||||
| 			$quad = new Quad(); | 			$quad = new Quad(); | ||||||
| 			$frame->add($quad); | 			$frame->add($quad); | ||||||
| 			$quad->setImageFocus($this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON_MOVER)); | 			$quad->setImageFocus($this->maniaControl->manialinkManager->getIconManager()->getIcon(IconManager::MX_ICON_MOVER)); | ||||||
| 			$quad->setImage($this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON)); | 			$quad->setImage($this->maniaControl->manialinkManager->getIconManager()->getIcon(IconManager::MX_ICON)); | ||||||
| 			$quad->setPosition(-$width / 2 + 4, -1.5, -0.5); | 			$quad->setPosition(-$width / 2 + 4, -1.5, -0.5); | ||||||
| 			$quad->setSize(4, 4); | 			$quad->setSize(4, 4); | ||||||
| 			$quad->setUrl($map->mx->pageurl); | 			$quad->setUrl($map->mx->pageurl); | ||||||
| @@ -252,8 +252,8 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin { | |||||||
| 		$posY         = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_CLOCK_WIDGET_POSY); | 		$posY         = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_CLOCK_WIDGET_POSY); | ||||||
| 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_CLOCK_WIDGET_WIDTH); | 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_CLOCK_WIDGET_WIDTH); | ||||||
| 		$height       = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_CLOCK_WIDGET_HEIGHT); | 		$height       = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_CLOCK_WIDGET_HEIGHT); | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadSubstyle(); | ||||||
|  |  | ||||||
| 		$maniaLink = new ManiaLink(self::MLID_CLOCK_WIDGET); | 		$maniaLink = new ManiaLink(self::MLID_CLOCK_WIDGET); | ||||||
|  |  | ||||||
| @@ -291,8 +291,8 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin { | |||||||
| 		$posY         = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_SERVERINFO_WIDGET_POSY); | 		$posY         = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_SERVERINFO_WIDGET_POSY); | ||||||
| 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_SERVERINFO_WIDGET_WIDTH); | 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_SERVERINFO_WIDGET_WIDTH); | ||||||
| 		$height       = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_SERVERINFO_WIDGET_HEIGHT); | 		$height       = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_SERVERINFO_WIDGET_HEIGHT); | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadSubstyle(); | ||||||
|  |  | ||||||
| 		$maniaLink = new ManiaLink(self::MLID_SERVERINFO_WIDGET); | 		$maniaLink = new ManiaLink(self::MLID_SERVERINFO_WIDGET); | ||||||
|  |  | ||||||
| @@ -421,9 +421,9 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin { | |||||||
| 		$posY         = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_NEXTMAP_WIDGET_POSY); | 		$posY         = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_NEXTMAP_WIDGET_POSY); | ||||||
| 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_NEXTMAP_WIDGET_WIDTH); | 		$width        = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_NEXTMAP_WIDGET_WIDTH); | ||||||
| 		$height       = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_NEXTMAP_WIDGET_HEIGHT); | 		$height       = $this->maniaControl->settingManager->getSettingValue($this, self::SETTING_NEXTMAP_WIDGET_HEIGHT); | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultQuadSubstyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultQuadSubstyle(); | ||||||
| 		$labelStyle   = $this->maniaControl->manialinkManager->styleManager->getDefaultLabelStyle(); | 		$labelStyle   = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultLabelStyle(); | ||||||
|  |  | ||||||
| 		$maniaLink = new ManiaLink(self::MLID_NEXTMAP_WIDGET); | 		$maniaLink = new ManiaLink(self::MLID_NEXTMAP_WIDGET); | ||||||
|  |  | ||||||
| @@ -440,7 +440,7 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin { | |||||||
| 		$backgroundQuad->setStyles($quadStyle, $quadSubstyle); | 		$backgroundQuad->setStyles($quadStyle, $quadSubstyle); | ||||||
|  |  | ||||||
| 		// Check if the Next Map is a queued Map | 		// Check if the Next Map is a queued Map | ||||||
| 		$queuedMap = $this->maniaControl->mapManager->mapQueue->getNextMap(); | 		$queuedMap = $this->maniaControl->mapManager->getMapQueue()->getNextMap(); | ||||||
|  |  | ||||||
| 		/** | 		/** | ||||||
| 		 * @var Player $requester | 		 * @var Player $requester | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ use Maniaplanet\DedicatedServer\Xmlrpc\Exception; | |||||||
| // TODO: idlekick function (?) | // TODO: idlekick function (?) | ||||||
|  |  | ||||||
| class QueuePlugin implements CallbackListener, ManialinkPageAnswerListener, TimerListener, Plugin { | class QueuePlugin implements CallbackListener, ManialinkPageAnswerListener, TimerListener, Plugin { | ||||||
| 	/** | 	/* | ||||||
| 	 * Constants | 	 * Constants | ||||||
| 	 */ | 	 */ | ||||||
| 	const ID                 = 22; | 	const ID                 = 22; | ||||||
| @@ -47,7 +47,7 @@ class QueuePlugin implements CallbackListener, ManialinkPageAnswerListener, Time | |||||||
| 	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 chat messages on queue join/leave/move to play'; | 	const QUEUE_CHATMESSAGES   = 'Activate chat messages on queue join/leave/move to play'; | ||||||
|  |  | ||||||
| 	/** | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var ManiaControl $maniaControl */ | 	/** @var ManiaControl $maniaControl */ | ||||||
| @@ -141,8 +141,8 @@ class QueuePlugin implements CallbackListener, ManialinkPageAnswerListener, Time | |||||||
| 	private function showJoinQueueWidget(Player $player) { | 	private function showJoinQueueWidget(Player $player) { | ||||||
| 		$maniaLink = new ManiaLink(self::ML_ID); | 		$maniaLink = new ManiaLink(self::ML_ID); | ||||||
|  |  | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowSubStyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowSubStyle(); | ||||||
| 		$maxQueue     = $this->maniaControl->settingManager->getSettingValue($this, self::QUEUE_MAX); | 		$maxQueue     = $this->maniaControl->settingManager->getSettingValue($this, self::QUEUE_MAX); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| @@ -403,8 +403,8 @@ class QueuePlugin implements CallbackListener, ManialinkPageAnswerListener, Time | |||||||
| 	private function showPlayWidget(Player $player) { | 	private function showPlayWidget(Player $player) { | ||||||
| 		$maniaLink = new ManiaLink(self::ML_ID); | 		$maniaLink = new ManiaLink(self::ML_ID); | ||||||
|  |  | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowSubStyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowSubStyle(); | ||||||
|  |  | ||||||
| 		// Main frame | 		// Main frame | ||||||
| 		$frame = new Frame(); | 		$frame = new Frame(); | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ use ManiaControl\Utils\Formatter; | |||||||
|  * @author TheM |  * @author TheM | ||||||
|  */ |  */ | ||||||
| class TeamSpeakPlugin implements CallbackListener, CommandListener, ManialinkPageAnswerListener, TimerListener, Plugin { | class TeamSpeakPlugin implements CallbackListener, CommandListener, ManialinkPageAnswerListener, TimerListener, Plugin { | ||||||
| 	/** | 	/* | ||||||
| 	 * Constants | 	 * Constants | ||||||
| 	 */ | 	 */ | ||||||
| 	const ID      = 23; | 	const ID      = 23; | ||||||
| @@ -47,7 +47,7 @@ class TeamSpeakPlugin implements CallbackListener, CommandListener, ManialinkPag | |||||||
| 	const TS_ICON       = 'Teamspeak.png'; | 	const TS_ICON       = 'Teamspeak.png'; | ||||||
| 	const TS_ICON_MOVER = 'Teamspeak_logo_press.png'; | 	const TS_ICON_MOVER = 'Teamspeak_logo_press.png'; | ||||||
|  |  | ||||||
| 	/** | 	/* | ||||||
| 	 * Private properties | 	 * Private properties | ||||||
| 	 */ | 	 */ | ||||||
| 	/** @var ManiaControl $maniaControl */ | 	/** @var ManiaControl $maniaControl */ | ||||||
| @@ -129,8 +129,8 @@ class TeamSpeakPlugin implements CallbackListener, CommandListener, ManialinkPag | |||||||
|  |  | ||||||
| 		$this->refreshTime = time(); | 		$this->refreshTime = time(); | ||||||
|  |  | ||||||
| 		$this->maniaControl->manialinkManager->iconManager->addIcon(self::TS_ICON); | 		$this->maniaControl->manialinkManager->getIconManager()->addIcon(self::TS_ICON); | ||||||
| 		$this->maniaControl->manialinkManager->iconManager->addIcon(self::TS_ICON_MOVER); | 		$this->maniaControl->manialinkManager->getIconManager()->addIcon(self::TS_ICON_MOVER); | ||||||
|  |  | ||||||
| 		$this->maniaControl->timerManager->registerTimerListening($this, 'ts3_queryServer', 1000); | 		$this->maniaControl->timerManager->registerTimerListening($this, 'ts3_queryServer', 1000); | ||||||
|  |  | ||||||
| @@ -311,8 +311,8 @@ class TeamSpeakPlugin implements CallbackListener, CommandListener, ManialinkPag | |||||||
| 	private function addToMenu() { | 	private function addToMenu() { | ||||||
| 		$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_OPEN_TSVIEWER, $this, 'command_tsViewer'); | 		$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_OPEN_TSVIEWER, $this, 'command_tsViewer'); | ||||||
| 		$itemQuad = new Quad(); | 		$itemQuad = new Quad(); | ||||||
| 		$itemQuad->setImage($this->maniaControl->manialinkManager->iconManager->getIcon(self::TS_ICON)); | 		$itemQuad->setImage($this->maniaControl->manialinkManager->getIconManager()->getIcon(self::TS_ICON)); | ||||||
| 		$itemQuad->setImageFocus($this->maniaControl->manialinkManager->iconManager->getIcon(self::TS_ICON_MOVER)); | 		$itemQuad->setImageFocus($this->maniaControl->manialinkManager->getIconManager()->getIcon(self::TS_ICON_MOVER)); | ||||||
| 		$itemQuad->setAction(self::ACTION_OPEN_TSVIEWER); | 		$itemQuad->setAction(self::ACTION_OPEN_TSVIEWER); | ||||||
| 		$this->maniaControl->actionsMenu->addMenuItem($itemQuad, true, 1, 'Open TeamSpeak Viewer'); | 		$this->maniaControl->actionsMenu->addMenuItem($itemQuad, true, 1, 'Open TeamSpeak Viewer'); | ||||||
| 	} | 	} | ||||||
| @@ -341,10 +341,10 @@ class TeamSpeakPlugin implements CallbackListener, CommandListener, ManialinkPag | |||||||
| 	 * @param mixed $player | 	 * @param mixed $player | ||||||
| 	 */ | 	 */ | ||||||
| 	private function showWidget($player) { | 	private function showWidget($player) { | ||||||
| 		$width        = $this->maniaControl->manialinkManager->styleManager->getListWidgetsWidth(); | 		$width        = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsWidth(); | ||||||
| 		$height       = $this->maniaControl->manialinkManager->styleManager->getListWidgetsHeight(); | 		$height       = $this->maniaControl->manialinkManager->getStyleManager()->getListWidgetsHeight(); | ||||||
| 		$quadStyle    = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowStyle(); | 		$quadStyle    = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowStyle(); | ||||||
| 		$quadSubstyle = $this->maniaControl->manialinkManager->styleManager->getDefaultMainWindowSubStyle(); | 		$quadSubstyle = $this->maniaControl->manialinkManager->getStyleManager()->getDefaultMainWindowSubStyle(); | ||||||
|  |  | ||||||
| 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | 		$maniaLink = new ManiaLink(ManialinkManager::MAIN_MLID); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user