Skip to content

Commit

Permalink
Fix the no-permission-message for the /clan command
Browse files Browse the repository at this point in the history
  • Loading branch information
Wertzui123 committed May 1, 2023
1 parent c2dd520 commit 8d00893
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 1 addition & 4 deletions src/Wertzui123/BedrockClans/commands/ClanCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8d00893

Please sign in to comment.