Cuberite Forum

Full Version: How can I get the tossed item?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

If you press 'q' in the hotbar, you can get the tossed item by Player:GetEquippedItem().

How can I get the tossed item if I drop the item with my mouse outside of the inventory? Naturally Player:GetEquippedItem() == -1 in this case.

If I am correct, there is no such thing as Player::GetHeldItem().

Thanks in advance Smile
It appears the current API does not support this. We should modify the API. I've opened a Github issue here.