mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user