prevent exception

This commit is contained in:
Steffen Schröder 2014-06-14 18:43:56 +02:00
parent a46e401746
commit 99d6299016

View File

@ -24,6 +24,7 @@ use ManiaControl\Manialinks\ManialinkPageAnswerListener;
use ManiaControl\Players\Player; use ManiaControl\Players\Player;
use ManiaControl\Utils\ColorUtil; use ManiaControl\Utils\ColorUtil;
use ManiaControl\Utils\Formatter; use ManiaControl\Utils\Formatter;
use Maniaplanet\DedicatedServer\Xmlrpc\NextMapException;
use Maniaplanet\DedicatedServer\Xmlrpc\NotInListException; use Maniaplanet\DedicatedServer\Xmlrpc\NotInListException;
use MCTeam\CustomVotesPlugin; use MCTeam\CustomVotesPlugin;
use MCTeam\KarmaPlugin; use MCTeam\KarmaPlugin;
@ -597,12 +598,12 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$this->maniaControl->mapManager->removeMap($player, $mapUid); $this->maniaControl->mapManager->removeMap($player, $mapUid);
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->mapQueue->dontQueueNextMapChange();
try { try {
$this->maniaControl->client->jumpToMapIdent($mapUid); $this->maniaControl->client->jumpToMapIdent($mapUid);
} catch (NotInListException $e) { } catch (NextMapException $e) {
$this->maniaControl->chat->sendError("Error on Jumping to Map Ident!"); $this->maniaControl->chat->sendError('Error on Jumping to Map Ident!', $player);
break; break;
} }