From 4569a73f3d2cbcb3c8d89e752ec871e46053a89e Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 31 Oct 2014 23:10:29 +0100 Subject: [PATCH] Fixed Entity being set position after being closed --- src/pocketmine/entity/Entity.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 1df47ddb4..9cd979592 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -1072,6 +1072,10 @@ abstract class Entity extends Location implements Metadatable{ } public function setPosition(Vector3 $pos){ + if($this->closed){ + return false; + } + if($pos instanceof Position and $pos->level instanceof Level and $pos->level !== $this->level){ if($this->switchLevel($pos->getLevel()) === false){ return false;