mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Fixed crash when /teleporting with yaw/pitch
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user