mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 14:05:35 +00:00
ÂCommand: fixed inconsistent API method name
This commit is contained in:
parent
407b78de3b
commit
948aa059c3
@ -86,7 +86,7 @@ abstract class Command{
|
|||||||
/**
|
/**
|
||||||
* @return string[]
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
public function getPermission() : array{
|
public function getPermissions() : array{
|
||||||
return $this->permission;
|
return $this->permission;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ class SimpleCommandMap implements CommandMap{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function register(string $fallbackPrefix, Command $command, ?string $label = null) : bool{
|
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");
|
throw new \InvalidArgumentException("Commands must have a permission set");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user