TeleportCommand: Fixed the bug fix again

This all comes from a shitty bugfix by @PEMapModder. Should be applied globally really, but it wasn't - and not properly tested either :P
This commit is contained in:
Dylan K. Taylor 2018-01-30 15:08:11 +00:00
parent 82948726ed
commit 9014eb72e9

View File

@ -47,9 +47,9 @@ class TeleportCommand extends VanillaCommand{
return true; return true;
} }
$args = array_filter($args, function($arg){ $args = array_values(array_filter($args, function($arg){
return strlen($arg) > 0; return strlen($arg) > 0;
}); }));
if(count($args) < 1 or count($args) > 6){ if(count($args) < 1 or count($args) > 6){
throw new InvalidCommandSyntaxException(); throw new InvalidCommandSyntaxException();
} }