From d22751d81263cd101b87a72ad7dec1910fbbfca1 Mon Sep 17 00:00:00 2001 From: kremsy Date: Mon, 8 May 2017 23:28:37 +0200 Subject: [PATCH] minor fix --- core/Server/Commands.php | 6 +++--- plugins/MCTeam/Dedimania/DedimaniaPlugin.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/Server/Commands.php b/core/Server/Commands.php index 25ca028a..606ce58d 100644 --- a/core/Server/Commands.php +++ b/core/Server/Commands.php @@ -474,10 +474,10 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer $pointString = $params[1]; $pointArray = explode(',', $pointString); $this->maniaControl->getModeScriptEventManager()->setTrackmaniaPointsRepartition($pointArray); - $this->maniaControl->getChat()->sendInformation('Points Repartition Changed!', $player); + $this->maniaControl->getChat()->sendInformation('Points Distribution Changed!', $player); $this->commandGetPointsRepartition($chatCallback, $player); } else { - $this->maniaControl->getChat()->sendError('You must provide a point Repartition in the following form: 10,8,6,4,3 !', $player); + $this->maniaControl->getChat()->sendError('You must provide a point Distribution in the following form: 10,8,6,4,3 !', $player); } } @@ -501,7 +501,7 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer } $pointRepartitionString = substr($pointRepartitionString, 0, -1); - $this->maniaControl->getChat()->sendInformation('Current Points Repartition: ' . $pointRepartitionString, $player); + $this->maniaControl->getChat()->sendInformation('Current Points Distribution: ' . $pointRepartitionString, $player); }); } diff --git a/plugins/MCTeam/Dedimania/DedimaniaPlugin.php b/plugins/MCTeam/Dedimania/DedimaniaPlugin.php index 683c9c9f..85d8b9e6 100644 --- a/plugins/MCTeam/Dedimania/DedimaniaPlugin.php +++ b/plugins/MCTeam/Dedimania/DedimaniaPlugin.php @@ -306,7 +306,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene $data = $this->decode($data); //Data[0][0] can be false in error case like map has no checkpoints - if (!is_array($data) || empty($data) || $data[0][0] == false) { + if (!is_array($data) || empty($data) || !isset($data[0]) || !isset($data[0][0]) || $data[0][0] == false) { return; }