diff --git a/src/command/Command.php b/src/command/Command.php index e17e7de87..02bae60d9 100644 --- a/src/command/Command.php +++ b/src/command/Command.php @@ -86,7 +86,7 @@ abstract class Command{ /** * @return string[] */ - public function getPermission() : array{ + public function getPermissions() : array{ return $this->permission; } diff --git a/src/command/SimpleCommandMap.php b/src/command/SimpleCommandMap.php index 525ecd317..1268e715b 100644 --- a/src/command/SimpleCommandMap.php +++ b/src/command/SimpleCommandMap.php @@ -139,7 +139,7 @@ class SimpleCommandMap implements CommandMap{ } public function register(string $fallbackPrefix, Command $command, ?string $label = null) : bool{ - if(count($command->getPermission()) === 0){ + if(count($command->getPermissions()) === 0){ throw new \InvalidArgumentException("Commands must have a permission set"); }