Playerlist Crashed if no spectator slots

This commit is contained in:
kremsy 2017-05-21 21:11:49 +02:00
parent 03621f1fba
commit 7cd0b8f17e

View File

@ -22,6 +22,7 @@ use ManiaControl\Manialinks\ManialinkManager;
use ManiaControl\Manialinks\ManialinkPageAnswerListener; use ManiaControl\Manialinks\ManialinkPageAnswerListener;
use ManiaControl\Utils\Formatter; use ManiaControl\Utils\Formatter;
use Maniaplanet\DedicatedServer\Xmlrpc\PlayerStateException; use Maniaplanet\DedicatedServer\Xmlrpc\PlayerStateException;
use Maniaplanet\DedicatedServer\Xmlrpc\ServerOptionsException;
use Maniaplanet\DedicatedServer\Xmlrpc\UnknownPlayerException; use Maniaplanet\DedicatedServer\Xmlrpc\UnknownPlayerException;
use MCTeam\CustomVotesPlugin; use MCTeam\CustomVotesPlugin;
@ -691,6 +692,8 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$this->maniaControl->getClient()->forceSpectatorTarget($adminLogin, $targetLogin, 1); $this->maniaControl->getClient()->forceSpectatorTarget($adminLogin, $targetLogin, 1);
} catch (PlayerStateException $e) { } catch (PlayerStateException $e) {
} catch (UnknownPlayerException $e) { } catch (UnknownPlayerException $e) {
} catch(ServerOptionsException $e){
//too many Spectators
} }
break; break;
case self::ACTION_OPEN_PLAYER_DETAILED: case self::ACTION_OPEN_PLAYER_DETAILED: