From dca7efa03cc62a41f849c63dca4015b48e91ffbf Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 3 Jul 2017 13:26:15 +0100 Subject: [PATCH] Fixed crash when /teleporting with yaw/pitch --- src/pocketmine/command/defaults/TeleportCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);