mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
WhitelistCommand: fixed silence on unknown subcommand
This commit is contained in:
parent
88c1014f03
commit
7c7e4f2093
@ -49,10 +49,6 @@ class WhitelistCommand extends VanillaCommand{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(count($args) === 0 or count($args) > 2){
|
||||
throw new InvalidCommandSyntaxException();
|
||||
}
|
||||
|
||||
if(count($args) === 1){
|
||||
if($this->badPerm($sender, strtolower($args[0]))){
|
||||
return false;
|
||||
@ -112,7 +108,7 @@ class WhitelistCommand extends VanillaCommand{
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
throw new InvalidCommandSyntaxException();
|
||||
}
|
||||
|
||||
private function badPerm(CommandSender $sender, string $subcommand) : bool{
|
||||
|
Loading…
x
Reference in New Issue
Block a user