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.
This commit is contained in:
Dylan K. Taylor 2018-08-05 12:53:31 +01:00
parent 5df56a1bac
commit ea9415961b

View File

@ -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);