mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
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:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user