The /admin config command now only works for moderators+
This commit is contained in:
parent
46bf05225e
commit
b4bbfe6c72
@ -11,6 +11,7 @@ use FML\Controls\Quads\Quad_Icons64x64_1;
|
|||||||
use FML\Controls\Quads\Quad_UIConstruction_Buttons;
|
use FML\Controls\Quads\Quad_UIConstruction_Buttons;
|
||||||
use FML\ManiaLink;
|
use FML\ManiaLink;
|
||||||
use FML\Script\Script;
|
use FML\Script\Script;
|
||||||
|
use ManiaControl\Admin\AuthenticationManager;
|
||||||
use ManiaControl\Callbacks\CallbackListener;
|
use ManiaControl\Callbacks\CallbackListener;
|
||||||
use ManiaControl\Callbacks\CallbackManager;
|
use ManiaControl\Callbacks\CallbackManager;
|
||||||
use ManiaControl\Commands\CommandListener;
|
use ManiaControl\Commands\CommandListener;
|
||||||
@ -97,6 +98,11 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn
|
|||||||
* @param array $callback
|
* @param array $callback
|
||||||
*/
|
*/
|
||||||
public function handleConfigCommand(array $callback, Player $player) {
|
public function handleConfigCommand(array $callback, Player $player) {
|
||||||
|
if(!$this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_MODERATOR)) {
|
||||||
|
$this->maniaControl->authenticationManager->sendNotAllowed($player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->showMenu($player);
|
$this->showMenu($player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user