From 5a248c42c25b0afff9b43a24bfd4bc2f7e4ae2f4 Mon Sep 17 00:00:00 2001 From: kremsy Date: Sun, 21 May 2017 19:36:57 +0200 Subject: [PATCH] added exception for shootmania dedimania plugin --- plugins/MCTeam/Dedimania/DedimaniaPlugin.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/MCTeam/Dedimania/DedimaniaPlugin.php b/plugins/MCTeam/Dedimania/DedimaniaPlugin.php index 672b6b58..d6ac431e 100644 --- a/plugins/MCTeam/Dedimania/DedimaniaPlugin.php +++ b/plugins/MCTeam/Dedimania/DedimaniaPlugin.php @@ -119,6 +119,9 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene 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);