catch game mode exception

This commit is contained in:
Steffen Schröder 2014-08-10 00:09:46 +02:00
parent 35a431e396
commit a316ffc9df

View File

@ -13,6 +13,7 @@ use ManiaControl\ManiaControl;
use ManiaControl\Manialinks\ManialinkManager; use ManiaControl\Manialinks\ManialinkManager;
use Maniaplanet\DedicatedServer\Xmlrpc\AlreadyInListException; use Maniaplanet\DedicatedServer\Xmlrpc\AlreadyInListException;
use Maniaplanet\DedicatedServer\Xmlrpc\FaultException; use Maniaplanet\DedicatedServer\Xmlrpc\FaultException;
use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
use Maniaplanet\DedicatedServer\Xmlrpc\NotInListException; use Maniaplanet\DedicatedServer\Xmlrpc\NotInListException;
use Maniaplanet\DedicatedServer\Xmlrpc\PlayerStateException; use Maniaplanet\DedicatedServer\Xmlrpc\PlayerStateException;
use Maniaplanet\DedicatedServer\Xmlrpc\ServerOptionsException; use Maniaplanet\DedicatedServer\Xmlrpc\ServerOptionsException;
@ -118,6 +119,9 @@ class PlayerActions {
} catch (ServerOptionsException $exception) { } catch (ServerOptionsException $exception) {
$this->forcePlayerToPlay($adminLogin, $targetLogin); $this->forcePlayerToPlay($adminLogin, $targetLogin);
return; return;
} catch (GameModeException $exception) {
$this->maniaControl->getChat()->sendException($exception, $admin);
return;
} }
$chatMessage = false; $chatMessage = false;