diff --git a/src/API/BlockAPI.php b/src/API/BlockAPI.php index dc778a36ed..0059c4d6f9 100644 --- a/src/API/BlockAPI.php +++ b/src/API/BlockAPI.php @@ -229,7 +229,7 @@ class BlockAPI{ break; } if($this->server->api->getProperty("item-enforcement") === false){ - $this->drop(new Vector3($player->entity->x - 0.5, $player->entity->y, $player->entity->z - 0.5), $item, true); + $this->server->api->entity->drop(new Position($player->entity->x - 0.5, $player->entity->y, $player->entity->z - 0.5, $player->level), $item, true); }else{ $player->addItem($item->getID(), $item->getMetadata(), $item->count); } @@ -781,4 +781,4 @@ class BlockAPI{ } } -} \ No newline at end of file +} diff --git a/src/API/TimeAPI.php b/src/API/TimeAPI.php index 97209dd881..21f748b5c1 100644 --- a/src/API/TimeAPI.php +++ b/src/API/TimeAPI.php @@ -123,7 +123,7 @@ class TimeAPI{ } public function set($time, $level = false){ - if(($level instanceof Level)){ + if(!($level instanceof Level)){ $level = $this->server->api->level->getDefault(); } if(is_string($time) and isset($this->phases[$time])){ @@ -135,4 +135,4 @@ class TimeAPI{ } -} \ No newline at end of file +} diff --git a/src/Player.php b/src/Player.php index 751940e77c..cdb6952239 100644 --- a/src/Player.php +++ b/src/Player.php @@ -1184,7 +1184,7 @@ class Player{ $data["item"] = $item; if($this->blocked === false and $this->server->handle("player.drop", $data) !== false){ if($this->removeItem($item->getID(), $item->getMetadata(), $item->count) === true or $this->itemEnforcement !== true){ - $this->server->api->block->drop(new Vector3($this->entity->x - 0.5, $this->entity->y, $this->entity->z - 0.5), $item); + $this->server->api->entity->drop(new Position($this->entity->x - 0.5, $this->entity->y, $this->entity->z - 0.5, $this->level), $item); } } break;