added exception for shootmania dedimania plugin

This commit is contained in:
kremsy 2017-05-21 19:36:57 +02:00
parent cfc3c2a25c
commit 5a248c42c2

View File

@ -119,6 +119,9 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
throw new \Exception("No Dedimania Code Specified, check the settings!"); throw new \Exception("No Dedimania Code Specified, check the settings!");
} }
if ($this->maniaControl->getMapManager()->getCurrentMap()->getGame() !== 'tm') {
throw new \Exception("This Plugin is only for Trackmania!");
}
$dedimaniaData = new DedimaniaData($serverInfo->login, $dedimaniaCode, $serverInfo->path, $packMask, $serverVersion); $dedimaniaData = new DedimaniaData($serverInfo->login, $dedimaniaCode, $serverInfo->path, $packMask, $serverVersion);