PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
EntityTeleportEvent.php
1 <?php
2 
22 namespace pocketmine\event\entity;
23 
25 use pocketmine\Event;
28 
29 class EntityTeleportEvent extends EntityEvent implements Cancellable{
30  public static $handlerList = null;
31  public static $eventPool = [];
32  public static $nextEvent = 0;
33 
35  private $from;
37  private $to;
38 
39  public function __construct(Entity $entity, Position $from, Position $to){
40  $this->entity = $entity;
41  $this->from = $from;
42  $this->to = $to;
43  }
44 
48  public function getFrom(){
49  return $this->from;
50  }
51 
55  public function setFrom(Position $from){
56  $this->from = $from;
57  }
58 
62  public function getTo(){
63  return $this->to;
64  }
65 
69  public function setTo(Position $to){
70  $this->to = $to;
71  }
72 
73 
74 }