diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index fa7b46324..f475deef5 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2412,17 +2412,12 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ } /** - * Drops an item on the ground in front of the player. Returns if the item drop was successful. + * Drops an item on the ground in front of the player. * * @param Item $item - * @return bool if the item was dropped or if the item was null */ - public function dropItem(Item $item) : bool{ - $motion = $this->getDirectionVector()->multiply(0.4); - - $this->level->dropItem($this->add(0, 1.3, 0), $item, $motion, 40); - - return true; + public function dropItem(Item $item) : void{ + $this->level->dropItem($this->add(0, 1.3, 0), $item, $this->getDirectionVector()->multiply(0.4), 40); } public function handleAdventureSettings(AdventureSettingsPacket $packet) : bool{ diff --git a/src/pocketmine/inventory/transaction/action/DropItemAction.php b/src/pocketmine/inventory/transaction/action/DropItemAction.php index 6605b5a39..0753e93fd 100644 --- a/src/pocketmine/inventory/transaction/action/DropItemAction.php +++ b/src/pocketmine/inventory/transaction/action/DropItemAction.php @@ -57,7 +57,8 @@ class DropItemAction extends InventoryAction{ * @return bool */ public function execute(Player $source) : bool{ - return $source->dropItem($this->targetItem); + $source->dropItem($this->targetItem); + return true; } public function onExecuteSuccess(Player $source) : void{