diff --git a/src/command/SimpleCommandMap.php b/src/command/SimpleCommandMap.php index b0308e7f0..b46a24d08 100644 --- a/src/command/SimpleCommandMap.php +++ b/src/command/SimpleCommandMap.php @@ -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(); }