Cuberite Forum
How can I get the tossed item? - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: How can I get the tossed item? (/thread-2436.html)



How can I get the tossed item? - exapro - 05-15-2016

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


RE: How can I get the tossed item? - LogicParrot - 05-15-2016

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