mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 04:06:54 +00:00
Use an array for command permissions
it doesn't make sense to have to parse the string every time we want to verify permissions, nor to expect that people will somehow know to use ; to separate them without it being documented anywhere...
This commit is contained in:
@@ -139,7 +139,7 @@ class SimpleCommandMap implements CommandMap{
|
||||
}
|
||||
|
||||
public function register(string $fallbackPrefix, Command $command, ?string $label = null) : bool{
|
||||
if($command->getPermission() === null){
|
||||
if(count($command->getPermission()) === 0){
|
||||
throw new \InvalidArgumentException("Commands must have a permission set");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user