Fixed Entity being set position after being closed

This commit is contained in:
Shoghi Cervantes 2014-10-31 23:10:29 +01:00
parent 66acb5cdd7
commit 4569a73f3d

View File

@ -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;