Improved player movement event firing & corrections

This commit is contained in:
Shoghi Cervantes
2014-10-14 00:11:17 +02:00
parent 464afb949e
commit 6e8144d5d9
2 changed files with 6 additions and 2 deletions

View File

@ -1037,7 +1037,7 @@ abstract class Entity extends Position implements Metadatable{
}
public function setPosition(Vector3 $pos, $force = false){
if($pos instanceof Position and $pos->getLevel() instanceof Level and $pos->getLevel() !== $this->getLevel()){
if($pos instanceof Position and $pos->level instanceof Level and $pos->level !== $this->level){
if($this->switchLevel($pos->getLevel()) === false){
return false;
}