From bb9067acd72e6630e3e57feb13b8b2cffeec7fc6 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sun, 19 May 2013 19:32:40 +0200 Subject: [PATCH] Fixed #262 --- src/Player.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Player.php b/src/Player.php index aa9bd6fa9..b6b1cb81e 100644 --- a/src/Player.php +++ b/src/Player.php @@ -362,9 +362,6 @@ class Player{ public function eventHandler($data, $event){ switch($event){ case "tile.container.slot": - if($player === $this){ - break; - } foreach($this->windows as $id => $w){ if($w === $data["tile"]){ $this->dataPacket(MC_CONTAINER_SET_SLOT, array( @@ -650,7 +647,7 @@ class Player{ return false; } - if($this->server->api->dhandle("player.gamemode.change", array("player" => $player, "gamemode" => $gm)) === false){ + if($this->server->api->dhandle("player.gamemode.change", array("player" => $this, "gamemode" => $gm)) === false){ return false; } @@ -1211,7 +1208,7 @@ class Player{ } unset($this->windows[$data["windowid"]]); $this->dataPacket(MC_CONTAINER_CLOSE, array( - "windowid" => $id, + "windowid" => $data["windowid"], )); break; case MC_CONTAINER_SET_SLOT: