spawnTo() public method

public spawnTo ( Player $player )
$player pocketmine\Player
Exemplo n.º 1
0
 public function spawnTo(Player $player)
 {
     $pk = $this->addEntityDataPacket($player);
     $pk->type = ZombieVillager::NETWORK_ID;
     $player->dataPacket($pk);
     parent::spawnTo($player);
 }
Exemplo n.º 2
0
 public function spawnTo(Player $player)
 {
     $pk = new AddEntityPacket();
     $pk->type = ZombieVillager::NETWORK_ID;
     $pk->eid = $this->getId();
     $pk->x = $this->x;
     $pk->y = $this->y;
     $pk->z = $this->z;
     $pk->speedX = $this->motionX;
     $pk->speedY = $this->motionY;
     $pk->speedZ = $this->motionZ;
     $pk->metadata = $this->dataProperties;
     $player->dataPacket($pk);
     parent::spawnTo($player);
 }