Removed EntityWorldChangeEvent

there's nothing that can be done with this event that can't be done with EntityTeleportEvent. Having this extra event needlessly increases system complexity.
This commit is contained in:
Dylan K. Taylor
2019-05-07 17:37:10 +01:00
parent cb3a225d45
commit 00944eff72
2 changed files with 0 additions and 59 deletions

View File

@ -34,7 +34,6 @@ use pocketmine\event\entity\EntityMotionEvent;
use pocketmine\event\entity\EntityRegainHealthEvent;
use pocketmine\event\entity\EntitySpawnEvent;
use pocketmine\event\entity\EntityTeleportEvent;
use pocketmine\event\entity\EntityWorldChangeEvent;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Bearing;
use pocketmine\math\Facing;
@ -1569,12 +1568,6 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
}
if($this->isValid()){
$ev = new EntityWorldChangeEvent($this, $this->world, $targetWorld);
$ev->call();
if($ev->isCancelled()){
return false;
}
$this->world->removeEntity($this);
if($this->chunk !== null){
$this->chunk->removeEntity($this);