Isn't that when a player drops an Item? I'm talking about when an item is already dropped and if you go near, it goes to your inventory
PHP: public function onPickupItem(InventoryPickupItemEvent $event) { $inventory = $event->getInventory(); if ($inventory instanceof PlayerInventory) { $player = $inventory->getHolder(); } }