From 38a958ed0869c8306b05b440c1c12901eaab4977 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Mon, 23 Jun 2014 16:31:22 +0200 Subject: [PATCH] Fixed #1526 $player->getPosition() returns a WeakRef error --- src/pocketmine/entity/Entity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index de9346dc9..12d8bb9d2 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -616,7 +616,7 @@ abstract class Entity extends Position implements Metadatable{ } public function getPosition(){ - return new Position($this->x, $this->y, $this->z, $this->level); + return new Position($this->x, $this->y, $this->z, $this->getLevel()); } public function collision(){