From 99d6299016be6aa4490bfbfccbb574335524738d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Sat, 14 Jun 2014 18:43:56 +0200 Subject: [PATCH] prevent exception --- application/core/Maps/MapList.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/application/core/Maps/MapList.php b/application/core/Maps/MapList.php index 5fc16a24..c4a52017 100644 --- a/application/core/Maps/MapList.php +++ b/application/core/Maps/MapList.php @@ -24,6 +24,7 @@ use ManiaControl\Manialinks\ManialinkPageAnswerListener; use ManiaControl\Players\Player; use ManiaControl\Utils\ColorUtil; use ManiaControl\Utils\Formatter; +use Maniaplanet\DedicatedServer\Xmlrpc\NextMapException; use Maniaplanet\DedicatedServer\Xmlrpc\NotInListException; use MCTeam\CustomVotesPlugin; use MCTeam\KarmaPlugin; @@ -597,12 +598,12 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $this->maniaControl->mapManager->removeMap($player, $mapUid); break; case self::ACTION_SWITCH_MAP: - //Don't queue on Map-Change + // Don't queue on Map-Change $this->maniaControl->mapManager->mapQueue->dontQueueNextMapChange(); try { $this->maniaControl->client->jumpToMapIdent($mapUid); - } catch (NotInListException $e) { - $this->maniaControl->chat->sendError("Error on Jumping to Map Ident!"); + } catch (NextMapException $e) { + $this->maniaControl->chat->sendError('Error on Jumping to Map Ident!', $player); break; }