From 4df7aed15dbdf0d19acbfe88fba82d61d6890305 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sat, 12 Jan 2013 17:15:59 +0100 Subject: [PATCH] Fixed some events --- src/API/BlockAPI.php | 2 ++ src/classes/Player.class.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/API/BlockAPI.php b/src/API/BlockAPI.php index f69098ffa..c01c50308 100644 --- a/src/API/BlockAPI.php +++ b/src/API/BlockAPI.php @@ -503,6 +503,8 @@ class BlockAPI{ ++$data2["y"]; $this->server->handle("player.block.place", $data2); } + $next = $this->server->api->level->getBlockFace($block, $face[(($direction + 2) % 4)]); + var_dump($next); break; case 54: case 61: diff --git a/src/classes/Player.class.php b/src/classes/Player.class.php index 2a6351b85..100f50fde 100644 --- a/src/classes/Player.class.php +++ b/src/classes/Player.class.php @@ -92,7 +92,7 @@ class Player{ public function close($reason = "", $msg = true){ if($this->connected === true){ - $this->server->dhandle("player.quit", $this); + $this->server->api->dhandle("player.quit", $this); $reason = $reason == "" ? "server stop":$reason; $this->save(); $this->eventHandler(new Container("You have been kicked. Reason: ".$reason), "server.chat"); @@ -345,7 +345,7 @@ class Player{ case MC_MOVE_PLAYER: if(is_object($this->entity)){ $this->entity->setPosition($data["x"], $data["y"], $data["z"], $data["yaw"], $data["pitch"]); - $this->server->dhandle("player.move", $this->entity); + $this->server->api->dhandle("player.move", $this->entity); } break; case MC_PLAYER_EQUIPMENT: