mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 00:29:54 +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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($args) === 0 or count($args) > 2){
|
|
||||||
throw new InvalidCommandSyntaxException();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(count($args) === 1){
|
if(count($args) === 1){
|
||||||
if($this->badPerm($sender, strtolower($args[0]))){
|
if($this->badPerm($sender, strtolower($args[0]))){
|
||||||
return false;
|
return false;
|
||||||
@ -112,7 +108,7 @@ class WhitelistCommand extends VanillaCommand{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
throw new InvalidCommandSyntaxException();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function badPerm(CommandSender $sender, string $subcommand) : bool{
|
private function badPerm(CommandSender $sender, string $subcommand) : bool{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user