diff --git a/src/API/BlockAPI.php b/src/API/BlockAPI.php index 5e7cf4b6e..484a98ed8 100644 --- a/src/API/BlockAPI.php +++ b/src/API/BlockAPI.php @@ -311,13 +311,11 @@ class BlockAPI{ if($target->isActivable === true){ if($this->server->api->dhandle("player.block.activate", array("player" => $player, "block" => $block, "target" => $target, "item" => $item)) !== false and $target->onActivate($item, $player) === true){ return false; - } else { - return $this->cancelAction($target, $player); } } if(($player->gamemode & 0x02) === 0x02){ //Adventure mode!! - return $this->cancelAction($block, $player); + return $this->cancelAction($block, $player, false); } if($block->y > 127 or $block->y < 0){ @@ -352,7 +350,7 @@ class BlockAPI{ if($this->server->api->dhandle("player.block.place", array("player" => $player, "block" => $block, "target" => $target, "item" => $item)) === false){ return $this->cancelAction($block, $player); }elseif($hand->place($item, $player, $block, $target, $face, $fx, $fy, $fz) === false){ - return $this->cancelAction($block, $player); + return $this->cancelAction($block, $player, false); } if($hand->getID() === SIGN_POST or $hand->getID() === WALL_SIGN){ $t = $this->server->api->tile->addSign($player->level, $block->x, $block->y, $block->z); diff --git a/src/Player.php b/src/Player.php index 26c7ec7ad..32191cd22 100644 --- a/src/Player.php +++ b/src/Player.php @@ -1223,6 +1223,7 @@ class Player{ if($this->spawned === false){ break; } + $data["eid"] = $this->eid; $data["player"] = $this;