commands: remove some nonsensical isValid() checks

a player who doesn't have a valid world has no business sending commands anyway.
This commit is contained in:
Dylan K. Taylor
2019-08-06 15:42:01 +01:00
parent dec6f73f2f
commit 9598af7683
2 changed files with 9 additions and 13 deletions

View File

@ -101,7 +101,7 @@ class TeleportCommand extends VanillaCommand{
Command::broadcastCommandMessage($sender, new TranslationContainer("commands.tp.success", [$origin->getName(), $target->getName()]));
return true;
}elseif($target->isValid()){
}else{
if(count($args) === 4 or count($args) === 6){
$pos = 1;
}else{
@ -124,7 +124,5 @@ class TeleportCommand extends VanillaCommand{
return true;
}
throw new InvalidCommandSyntaxException();
}
}