mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 07:09:56 +00:00
Fixed crash when /teleporting with yaw/pitch
This commit is contained in:
parent
b4a149cce8
commit
dca7efa03c
@ -111,8 +111,8 @@ class TeleportCommand extends VanillaCommand{
|
|||||||
$pitch = $target->getPitch();
|
$pitch = $target->getPitch();
|
||||||
|
|
||||||
if(count($args) === 6 or (count($args) === 5 and $pos === 3)){
|
if(count($args) === 6 or (count($args) === 5 and $pos === 3)){
|
||||||
$yaw = $args[$pos++];
|
$yaw = (float) $args[$pos++];
|
||||||
$pitch = $args[$pos++];
|
$pitch = (float) $args[$pos++];
|
||||||
}
|
}
|
||||||
|
|
||||||
$target->teleport(new Vector3($x, $y, $z), $yaw, $pitch);
|
$target->teleport(new Vector3($x, $y, $z), $yaw, $pitch);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user