prevent exception
This commit is contained in:
parent
8592b4d47d
commit
a46e401746
@ -18,6 +18,7 @@ use Maniaplanet\DedicatedServer\Xmlrpc\FileException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\IndexOutOfBoundException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\InvalidMapException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\NotInListException;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\UnavailableFeatureException;
|
||||
|
||||
// TODO: adding of local maps
|
||||
|
||||
@ -525,7 +526,11 @@ class MapManager implements CallbackListener {
|
||||
* @return Map
|
||||
*/
|
||||
private function fetchCurrentMap() {
|
||||
try {
|
||||
$rpcMap = $this->maniaControl->client->getCurrentMapInfo();
|
||||
} catch (UnavailableFeatureException $exception) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (array_key_exists($rpcMap->uId, $this->maps)) {
|
||||
$this->currentMap = $this->maps[$rpcMap->uId];
|
||||
|
Loading…
Reference in New Issue
Block a user