PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
EntityDespawnEvent.php
1 <?php
2 
22 namespace pocketmine\event\entity;
23 
30 
35  public static $handlerList = null;
36  public static $eventPool = [];
37  public static $nextEvent = 0;
38 
39  private $entityType;
40 
44  public function __construct(Entity $entity){
45  $this->entity = $entity;
46  $this->entityType = $entity::NETWORK_ID;
47  }
48 
52  public function getType(){
53  return $this->entityType;
54  }
55 
59  public function isCreature(){
60  return $this->entity instanceof Creature;
61  }
62 
66  public function isHuman(){
67  return $this->entity instanceof Human;
68  }
69 
73  public function isProjectile(){
74  return $this->entity instanceof Projectile;
75  }
76 
80  public function isVehicle(){
81  return $this->entity instanceof Vehicle;
82  }
83 
87  public function isItem(){
88  return $this->entity instanceof Item;
89  }
90 
91 }