mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 21:45:35 +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{
|
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){
|
if($label === null){
|
||||||
$label = $command->getLabel();
|
$label = $command->getLabel();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user