diff --git a/src/pocketmine/command/defaults/TeleportCommand.php b/src/pocketmine/command/defaults/TeleportCommand.php index cd0e42a7d..62b6a52f8 100644 --- a/src/pocketmine/command/defaults/TeleportCommand.php +++ b/src/pocketmine/command/defaults/TeleportCommand.php @@ -47,9 +47,9 @@ class TeleportCommand extends VanillaCommand{ return true; } - $args = array_filter($args, function($arg){ + $args = array_values(array_filter($args, function($arg){ return strlen($arg) > 0; - }); + })); if(count($args) < 1 or count($args) > 6){ throw new InvalidCommandSyntaxException(); }