From 6519216b906accb7d037d59993b2648af78eaa15 Mon Sep 17 00:00:00 2001 From: kremsy Date: Mon, 16 Oct 2017 15:23:45 +0200 Subject: [PATCH] Fix Permission Problem Trackmania Rounds Plugin --- plugins/MCTeam/TrackmaniaRoundsPlugin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/MCTeam/TrackmaniaRoundsPlugin.php b/plugins/MCTeam/TrackmaniaRoundsPlugin.php index 6a3fe208..63830181 100644 --- a/plugins/MCTeam/TrackmaniaRoundsPlugin.php +++ b/plugins/MCTeam/TrackmaniaRoundsPlugin.php @@ -21,7 +21,7 @@ class TrackmaniaRoundsPlugin implements Plugin, CommandListener { * Constants */ const PLUGIN_ID = 6; - const PLUGIN_VERSION = 0.1; + const PLUGIN_VERSION = 0.11; const PLUGIN_NAME = 'Trackmania Rounds Plugin'; const PLUGIN_AUTHOR = 'MCTeam'; @@ -82,7 +82,7 @@ class TrackmaniaRoundsPlugin implements Plugin, CommandListener { */ public function commandSetPointsRepartition(array $chatCallback, Player $player) { $permission = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_PERMISSION_TM_HANDLE_POINTS_REPARTITION); - if (!AuthenticationManager::checkRight($player, $permission)) { + if (!AuthenticationManager::checkRight($player, AuthenticationManager::getAuthLevel($permission))) { $this->maniaControl->getAuthenticationManager()->sendNotAllowed($player); return; } @@ -121,7 +121,7 @@ class TrackmaniaRoundsPlugin implements Plugin, CommandListener { */ public function commandGetPointsRepartition(array $chatCallback, Player $player) { $permission = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_PERMISSION_TM_HANDLE_POINTS_REPARTITION); - if (!AuthenticationManager::checkRight($player, $permission)) { + if (!AuthenticationManager::checkRight($player, AuthenticationManager::getAuthLevel($permission))) { $this->maniaControl->getAuthenticationManager()->sendNotAllowed($player); return; } @@ -140,7 +140,7 @@ class TrackmaniaRoundsPlugin implements Plugin, CommandListener { */ public function commandTrackManiaEndRound(array $chatCallback, Player $player) { $permission = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_PERMISSION_END_ROUND); - if (!AuthenticationManager::checkRight($player, $permission)) { + if (!AuthenticationManager::checkRight($player, AuthenticationManager::getAuthLevel($permission))) { $this->maniaControl->getAuthenticationManager()->sendNotAllowed($player); return; }