mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-28 22:30:01 +00:00
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:
parent
5df56a1bac
commit
ea9415961b
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user