entity = $entity; $this->entityType = $entity::NETWORK_ID; } /** * @return \pocketmine\level\Position */ public function getPosition(){ return $this->entity->getPosition(); } /** * @return int */ public function getType(){ return $this->entityType; } /** * @return bool */ public function isCreature(){ return $this->entity instanceof Creature; } /** * @return bool */ public function isHuman(){ return $this->entity instanceof Human; } /** * @return bool */ public function isProjectile(){ return $this->entity instanceof Projectile; } /** * @return bool */ public function isVehicle(){ return $this->entity instanceof Vehicle; } /** * @return bool */ public function isItem(){ return $this->entity instanceof Item; } }