From dd729ced68f91c2682791d8f64262fe7b885cc37 Mon Sep 17 00:00:00 2001 From: williamtdr Date: Fri, 11 Jul 2014 10:21:58 -0500 Subject: [PATCH] Revert "Possible fix for #1628" This reverts commit a6e22de6a3d58fd5b848a2b211f1b7bbc5778a6b. --- src/pocketmine/command/defaults/SpawnpointCommand.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pocketmine/command/defaults/SpawnpointCommand.php b/src/pocketmine/command/defaults/SpawnpointCommand.php index 4fbf13c6e..42acf1868 100644 --- a/src/pocketmine/command/defaults/SpawnpointCommand.php +++ b/src/pocketmine/command/defaults/SpawnpointCommand.php @@ -66,9 +66,9 @@ class SpawnpointCommand extends VanillaCommand{ if(count($args) === 4){ if($level !== null){ - $x = (int) $this->getRelativeDouble($sender->getX(), $sender, $args[1]); - $y = (int) $this->getRelativeDouble($sender->getY(), $sender, $args[2], 0, 128); - $z = (int) $this->getRelativeDouble($sender->getZ(), $sender, $args[3]); + $x = (int) $this->getRelativeDouble($sender->x, $sender, $args[1]); + $y = (int) $this->getRelativeDouble($sender->y, $sender, $args[2], 0, 128); + $z = (int) $this->getRelativeDouble($sender->z, $sender, $args[3]); $target->setSpawn(new Position($x, $y, $z, $level)); Command::broadcastCommandMessage($sender, "Set " . $target->getName() . "'s spawnpoint to " . $x . ", " . $y . ", " . $z); @@ -76,7 +76,7 @@ class SpawnpointCommand extends VanillaCommand{ } }elseif(count($args) <= 1){ if($sender instanceof Player){ - $pos = new Position((int) $sender->getX(), (int) $sender->getY(), (int) $sender->getZ(), $sender->getLevel()); + $pos = new Position((int) $sender->x, (int) $sender->y, (int) $sender->z, $sender->getLevel()); $target->setSpawn($pos); Command::broadcastCommandMessage($sender, "Set " . $target->getName() . "'s spawnpoint to " . $pos->x . ", " . $pos->y . ", " . $pos->z);