TransferServerCommand: add missing boilerplate permission check

This commit is contained in:
Dylan K. Taylor 2019-10-20 14:28:53 +01:00
parent 04e4a36653
commit bf44bd016d

View File

@ -42,6 +42,10 @@ class TransferServerCommand extends VanillaCommand{
} }
public function execute(CommandSender $sender, string $commandLabel, array $args){ public function execute(CommandSender $sender, string $commandLabel, array $args){
if(!$this->testPermission($sender)){
return true;
}
if(count($args) < 1){ if(count($args) < 1){
throw new InvalidCommandSyntaxException(); throw new InvalidCommandSyntaxException();
}elseif(!($sender instanceof Player)){ }elseif(!($sender instanceof Player)){