callbacks update https://github.com/maniaplanet/script-xmlrpc/releases
to have this mc version working you need to update the dedicated server scripts
This commit is contained in:
		| @@ -0,0 +1,50 @@ | ||||
| <?php | ||||
|  | ||||
| namespace ManiaControl\Callbacks\Structures\ManiaPlanet; | ||||
|  | ||||
|  | ||||
| use ManiaControl\Callbacks\Structures\Common\BaseTimeStructure; | ||||
| use ManiaControl\ManiaControl; | ||||
|  | ||||
| /** | ||||
|  * Structure Class for the Loading Map End and UnloadingMap Begin Callbacks | ||||
|  * | ||||
|  * @api | ||||
|  * @author    ManiaControl Team <mail@maniacontrol.com> | ||||
|  * @copyright 2014-2017 ManiaControl Team | ||||
|  * @license   http://www.gnu.org/licenses/ GNU General Public License, Version 3 | ||||
|  */ | ||||
| class LoadingUnloadingMapStructure extends BaseTimeStructure { | ||||
| 	private $restarted; | ||||
|  | ||||
| 	/** | ||||
| 	 * StartServerStructure constructor. | ||||
| 	 * | ||||
| 	 * @param \ManiaControl\ManiaControl $maniaControl | ||||
| 	 * @param                            $data | ||||
| 	 */ | ||||
| 	public function __construct(ManiaControl $maniaControl, $data) { | ||||
| 		parent::__construct($maniaControl, $data); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Flag if the Server got Restarted | ||||
| 	 * | ||||
| 	 * @api | ||||
| 	 * @return mixed | ||||
| 	 */ | ||||
| 	public function getRestarted() { | ||||
| 		return $this->restarted; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Gets the Map | ||||
| 	 * | ||||
| 	 * @api | ||||
| 	 * @return \ManiaControl\Maps\Map | ||||
| 	 */ | ||||
| 	public function getMap() { | ||||
| 		return $this->maniaControl->getMapManager()->getMapByUid($this->getPlainJsonObject()->map->uid); | ||||
| 	} | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user