mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
parent
082f9e1647
commit
cb10360c20
@ -139,6 +139,10 @@ class SimpleCommandMap implements CommandMap{
|
||||
}
|
||||
|
||||
public function register(string $fallbackPrefix, Command $command, ?string $label = null) : bool{
|
||||
if($command->getPermission() === null){
|
||||
throw new \InvalidArgumentException("Commands must have a permission set");
|
||||
}
|
||||
|
||||
if($label === null){
|
||||
$label = $command->getLabel();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user