diff --git a/libs/Maniaplanet/DedicatedServer/Xmlrpc/FaultException.php b/libs/Maniaplanet/DedicatedServer/Xmlrpc/FaultException.php index f5924b6d..8995b841 100755 --- a/libs/Maniaplanet/DedicatedServer/Xmlrpc/FaultException.php +++ b/libs/Maniaplanet/DedicatedServer/Xmlrpc/FaultException.php @@ -22,6 +22,7 @@ class FaultException extends Exception { case 'No map currently loaded.': case 'No replay to save': case 'Internal error.': + case 'Unable to retrieve validation data. ': return new UnavailableFeatureException($faultString, $faultCode); case 'You must enable the callbacks to be able to do chat routing.': case 'Chat routing not enabled.': diff --git a/plugins/MCTeam/Dedimania/DedimaniaPlugin.php b/plugins/MCTeam/Dedimania/DedimaniaPlugin.php index be468e1f..a17b8c55 100644 --- a/plugins/MCTeam/Dedimania/DedimaniaPlugin.php +++ b/plugins/MCTeam/Dedimania/DedimaniaPlugin.php @@ -22,6 +22,7 @@ use ManiaControl\Players\Player; use ManiaControl\Players\PlayerManager; use ManiaControl\Plugins\Plugin; use ManiaControl\Utils\Formatter; +use Maniaplanet\DedicatedServer\Xmlrpc\UnavailableFeatureException; /** * ManiaControl Dedimania Plugin @@ -1096,11 +1097,17 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene */ private function setRecordReplays(RecordData &$record) { // Set validation replay - $validationReplay = $this->maniaControl->getServer()->getValidationReplay($record->login); - if ($validationReplay) { - $record->vReplay = $validationReplay; + try{ + $validationReplay = $this->maniaControl->getServer()->getValidationReplay($record->login); + if ($validationReplay) { + $record->vReplay = $validationReplay; + } + + }catch (UnavailableFeatureException $e){ + Logger::logError("Unable to get Validation Replay from the Server"); } + // Set ghost replay if ($record->rank <= 1) { $dataDirectory = $this->maniaControl->getServer()->getDirectory()->getGameDataFolder();