diff --git a/src/pocketmine/command/defaults/TeleportCommand.php b/src/pocketmine/command/defaults/TeleportCommand.php index 8807c576e..d43a4bcce 100644 --- a/src/pocketmine/command/defaults/TeleportCommand.php +++ b/src/pocketmine/command/defaults/TeleportCommand.php @@ -111,8 +111,8 @@ class TeleportCommand extends VanillaCommand{ $pitch = $target->getPitch(); if(count($args) === 6 or (count($args) === 5 and $pos === 3)){ - $yaw = $args[$pos++]; - $pitch = $args[$pos++]; + $yaw = (float) $args[$pos++]; + $pitch = (float) $args[$pos++]; } $target->teleport(new Vector3($x, $y, $z), $yaw, $pitch);