pocketmine\Player::teleportImmediate PHP Method

teleportImmediate() public method

Use teleport() for a delayed teleport after chunks have been sent.
public teleportImmediate ( Vector3 $pos, float $yaw = null, float $pitch = null )
$pos pocketmine\math\Vector3
$yaw float
$pitch float
    public function teleportImmediate(Vector3 $pos, $yaw = null, $pitch = null)
    {
        if (parent::teleport($pos, $yaw, $pitch)) {
            foreach ($this->windowIndex as $window) {
                if ($window === $this->inventory) {
                    continue;
                }
                $this->removeWindow($window);
            }
            $this->forceMovement = new Vector3($this->x, $this->y, $this->z);
            $this->sendPosition($this, $this->yaw, $this->pitch, 1);
            $this->resetFallDistance();
            $this->orderChunks();
            $this->nextChunkOrderRun = 0;
            $this->newPosition = null;
        }
    }
Player