Fixed invalid Position object on teleport

This commit is contained in:
Shoghi Cervantes
2014-01-23 19:02:09 +01:00
parent 4ae1709196
commit f432f110a4
2 changed files with 2 additions and 2 deletions

View File

@@ -887,7 +887,7 @@ class Player{
return false;
}
if($pos instanceof Position and $pos->level !== $this->level){
if($pos instanceof Position and $pos->level instanceof Level and $pos->level !== $this->level){
if($this->server->api->dhandle("player.teleport.level", array("player" => $this, "origin" => $this->level, "target" => $pos->level)) === false){
$this->entity->check = true;
return false;