pocketmine\Player::linkHookToPlayer PHP Method

linkHookToPlayer() public method

public linkHookToPlayer ( FishingHook $entity )
$entity pocketmine\entity\FishingHook
    public function linkHookToPlayer(FishingHook $entity)
    {
        if ($entity->isAlive()) {
            $this->setFishingHook($entity);
            $pk = new EntityEventPacket();
            $pk->eid = $this->getFishingHook()->getId();
            $pk->event = EntityEventPacket::FISH_HOOK_POSITION;
            $this->server->broadcastPacket($this->level->getPlayers(), $pk);
            return true;
        }
        return false;
    }
Player