fixed exceptions
This commit is contained in:
parent
d517c2d561
commit
28cfee646a
@ -24,6 +24,7 @@ use ManiaControl\Players\Player;
|
|||||||
use ManiaControl\Utils\ColorUtil;
|
use ManiaControl\Utils\ColorUtil;
|
||||||
use ManiaControl\Utils\Formatter;
|
use ManiaControl\Utils\Formatter;
|
||||||
use Maniaplanet\DedicatedServer\Xmlrpc\ChangeInProgressException;
|
use Maniaplanet\DedicatedServer\Xmlrpc\ChangeInProgressException;
|
||||||
|
use Maniaplanet\DedicatedServer\Xmlrpc\FileException;
|
||||||
use Maniaplanet\DedicatedServer\Xmlrpc\NextMapException;
|
use Maniaplanet\DedicatedServer\Xmlrpc\NextMapException;
|
||||||
use Maniaplanet\DedicatedServer\Xmlrpc\NotInListException;
|
use Maniaplanet\DedicatedServer\Xmlrpc\NotInListException;
|
||||||
use MCTeam\CustomVotesPlugin;
|
use MCTeam\CustomVotesPlugin;
|
||||||
@ -629,7 +630,11 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
|||||||
$this->showMapList($player);
|
$this->showMapList($player);
|
||||||
break;
|
break;
|
||||||
case self::ACTION_REMOVE_MAP:
|
case self::ACTION_REMOVE_MAP:
|
||||||
|
try {
|
||||||
$this->maniaControl->getMapManager()->removeMap($player, $mapUid);
|
$this->maniaControl->getMapManager()->removeMap($player, $mapUid);
|
||||||
|
} catch (FileException $e) {
|
||||||
|
$this->maniaControl->getChat()->sendException($e, $player);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case self::ACTION_SWITCH_MAP:
|
case self::ACTION_SWITCH_MAP:
|
||||||
// Don't queue on Map-Change
|
// Don't queue on Map-Change
|
||||||
|
@ -10,6 +10,7 @@ use ManiaControl\ManiaControl;
|
|||||||
use ManiaControl\Players\Player;
|
use ManiaControl\Players\Player;
|
||||||
use ManiaControl\Utils\Formatter;
|
use ManiaControl\Utils\Formatter;
|
||||||
use Maniaplanet\DedicatedServer\Xmlrpc\NextMapException;
|
use Maniaplanet\DedicatedServer\Xmlrpc\NextMapException;
|
||||||
|
use Maniaplanet\DedicatedServer\Xmlrpc\NotInListException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ManiaControl Map Queue Class
|
* ManiaControl Map Queue Class
|
||||||
@ -334,7 +335,7 @@ class MapQueue implements CallbackListener, CommandListener {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//found player, so play this map
|
// Player found, so play this map
|
||||||
if ($this->maniaControl->getPlayerManager()->getPlayer($player->login)) {
|
if ($this->maniaControl->getPlayerManager()->getPlayer($player->login)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -369,6 +370,7 @@ class MapQueue implements CallbackListener, CommandListener {
|
|||||||
try {
|
try {
|
||||||
$this->maniaControl->getClient()->setNextMapIdent($map->uid);
|
$this->maniaControl->getClient()->setNextMapIdent($map->uid);
|
||||||
} catch (NextMapException $e) {
|
} catch (NextMapException $e) {
|
||||||
|
} catch (NotInListException $e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user