public function kill() { parent::kill(); foreach ($this->getDrops() as $item) { $this->getLevel()->dropItem($this, $item); } }
public function spawnTo(Player $player) { $pk = new AddPaintingPacket(); $pk->eid = $this->getId(); $pk->x = $this->x; $pk->y = $this->y; $pk->z = $this->z; $pk->direction = $this->getDirection(); $pk->title = $this->motive; $player->dataPacket($pk); parent::spawnTo($player); }