From 8d0089378fd549b2ee4d548fdb7838f7adee646b Mon Sep 17 00:00:00 2001 From: Wertzui123 <46199283+Wertzui123@users.noreply.github.com> Date: Mon, 1 May 2023 17:31:57 +0200 Subject: [PATCH] Fix the no-permission-message for the `/clan` command --- plugin.yml | 2 +- src/Wertzui123/BedrockClans/commands/ClanCommand.php | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/plugin.yml b/plugin.yml index f0d8fe6..310998a 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ name: BedrockClans main: Wertzui123\BedrockClans\Main -version: 3.8 +version: "3.8.1" api: 5.0.0 load: POSTWORLD author: Wertzui123 diff --git a/src/Wertzui123/BedrockClans/commands/ClanCommand.php b/src/Wertzui123/BedrockClans/commands/ClanCommand.php index e3682a2..9a4a2ab 100644 --- a/src/Wertzui123/BedrockClans/commands/ClanCommand.php +++ b/src/Wertzui123/BedrockClans/commands/ClanCommand.php @@ -38,15 +38,12 @@ public function __construct(Main $plugin, $data) { parent::__construct($data['command'], $data['description'], $data['usage'], $data['aliases']); $this->setPermissions(['bedrockclans.command.clan']); + $this->setPermissionMessage($plugin->getMessage('command.clan.noPermission')); $this->plugin = $plugin; } public function execute(CommandSender $sender, string $commandLabel, array $args) { - if (!$sender->hasPermission($this->getPermissions()[0])) { - $sender->sendMessage($this->plugin->getMessage('command.clan.noPermission')); - return; - } if (!isset($args[0])) { $sender->sendMessage($this->plugin->getMessage('command.clan.usage')); return;