fixed bug with mxids

This commit is contained in:
kremsy
2014-01-12 21:39:27 +01:00
committed by Steffen Schröder
parent a550ed9e0e
commit f7430dfad9
4 changed files with 32 additions and 2 deletions

View File

@ -137,6 +137,30 @@ class MapManager implements CallbackListener {
return true;
}
/**
* Updates a Map from Mania Exchange
*
* @param Player $admin
* @param $mxId
* @param $uid
*/
public function updateMap(Player $admin, $uid) {
return;
//TODO not finished yet
$mapsDirectory = $this->maniaControl->server->getMapsDirectory();
if(!$this->maniaControl->server->checkAccess($mapsDirectory)) {
$this->maniaControl->chat->sendError("ManiaControl doesn't have access to the maps directory.", $admin->login);
return;
}
$map = $this->maps[$uid];
/** @var Map $map */
$mxId = $map->mx->id;
$this->removeMap($admin, $uid, true);
$this->addMapFromMx($mxId, $admin->login);
}
/**
* Remove a Map
*