From 2f8c281a2e0451ad64bcbe321d53bbb0de32129e Mon Sep 17 00:00:00 2001 From: PEMapModder Date: Thu, 5 Feb 2015 18:00:25 +0800 Subject: [PATCH] Added Location::__toString() --- src/pocketmine/level/Location.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pocketmine/level/Location.php b/src/pocketmine/level/Location.php index e1dfb4488..64e8ec32f 100644 --- a/src/pocketmine/level/Location.php +++ b/src/pocketmine/level/Location.php @@ -51,4 +51,7 @@ class Location extends Position{ return $this->pitch; } + public function __toString(){ + return return "Location(level=" . ($this->isValid() ? $this->getLevel()->getName() : "null") . ",x=$this->x,y=$this->y,z=$this->z,yaw=$this->yaw,pitch=$this->pitch)"; + } }