TrackManiaControl/application/core/Maps/MapActions.php
Steffen Schröder 002b537b47 various phpdoc improvements and additions
added some getter methods for properties
2014-07-25 16:28:47 +02:00

47 lines
1.0 KiB
PHP

<?php
namespace ManiaControl\Maps;
use ManiaControl\ManiaControl;
use Maniaplanet\DedicatedServer\Xmlrpc\ChangeInProgressException;
/**
* ManiaControl Map Actions Class
*
* @author ManiaControl Team <mail@maniacontrol.com>
* @copyright 2014 ManiaControl Team
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
class MapActions {
/*
* Private properties
*/
private $maniaControl = null;
/**
* Construct a map actions instance
*
* @param ManiaControl $maniaControl
*/
public function __construct(ManiaControl $maniaControl) {
$this->maniaControl = $maniaControl;
}
/**
* Skip the current Map
*/
public function skipMap() {
//Force a EndMap on the MapQueue to set the next Map
$this->maniaControl->mapManager->mapQueue->endMap(null);
//ignore EndMap on MapQueue
$this->maniaControl->mapManager->mapQueue->dontQueueNextMapChange();
//Switch The Map
try {
$this->maniaControl->client->nextMap();
} catch (ChangeInProgressException $e) {
}
}
}