From ea9415961b0c9e19bb813eb5fed50cc29d6994e0 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 5 Aug 2018 12:53:31 +0100 Subject: [PATCH] Player: remove useless check from dropItem() the transaction system will deal with this now, and if a plugin wants to make a player drop a null item, they are free to do so. --- src/pocketmine/Player.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 03346f1c4..fa7b46324 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -2418,11 +2418,6 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ * @return bool if the item was dropped or if the item was null */ public function dropItem(Item $item) : bool{ - if($item->isNull()){ - $this->server->getLogger()->debug($this->getName() . " attempted to drop a null item (" . $item . ")"); - return true; - } - $motion = $this->getDirectionVector()->multiply(0.4); $this->level->dropItem($this->add(0, 1.3, 0), $item, $motion, 40);