exception plugins

This commit is contained in:
kremsy 2014-04-19 23:40:54 +02:00 committed by Steffen Schröder
parent 7bb2d98a43
commit 9dc1d6c91e

View File

@ -27,6 +27,7 @@ use ManiaControl\Server\Server;
use ManiaControl\Server\ServerCommands; use ManiaControl\Server\ServerCommands;
use Maniaplanet\DedicatedServer\Structures\VoteRatio; use Maniaplanet\DedicatedServer\Structures\VoteRatio;
use Maniaplanet\DedicatedServer\Xmlrpc\Exception; use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
use Maniaplanet\DedicatedServer\Xmlrpc\NotInScriptModeException;
/** /**
@ -261,12 +262,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
$itemQuad->setAction(self::ACTION_START_VOTE . 'pausegame'); $itemQuad->setAction(self::ACTION_START_VOTE . 'pausegame');
$this->addVoteMenuItem($itemQuad, 10, 'Vote for a pause of Current Game'); $this->addVoteMenuItem($itemQuad, 10, 'Vote for a pause of Current Game');
} }
} catch(Exception $e) { } catch(NotInScriptModeException $e) {
if ($e->getMessage() == 'Not in script mode.') {
// Do nothing
} else {
throw $e;
}
} }
//Menu SkipMap //Menu SkipMap