Skip to content

Commit

Permalink
Changed order of permission check.
Browse files Browse the repository at this point in the history
  • Loading branch information
matcracker committed Apr 25, 2020
1 parent 0382baf commit 35090d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/matcracker/BedcoreProtect/commands/BCPCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function execute(CommandSender $sender, string $commandLabel, array $args
}

$subCmd = $this->removeAbbreviation(strtolower($args[0]));
if (!$sender->hasPermission('bcp.command.bedcoreprotect') || !$sender->hasPermission("bcp.subcommand.{$subCmd}")) {
if (!$sender->hasPermission("bcp.subcommand.{$subCmd}") || !$sender->hasPermission('bcp.command.bedcoreprotect')) {
$sender->sendMessage(TextFormat::colorize(Main::MESSAGE_PREFIX . '&c' . $lang->translateString('command.no-permission')));

return false;
Expand Down

0 comments on commit 35090d9

Please sign in to comment.