ÂCommand: fixed inconsistent API method name

This commit is contained in:
Dylan K. Taylor 2023-03-02 15:09:52 +00:00
parent 407b78de3b
commit 948aa059c3
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ abstract class Command{
/**
* @return string[]
*/
public function getPermission() : array{
public function getPermissions() : array{
return $this->permission;
}

View File

@ -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");
}