====== OnPlayerTossingItem hook callback function ======
OnPlayerTossingItem() is called when a player has tossed an item (Q keypress). The pickup has not been spawned yet. Plugins may disallow the tossing, but in that case they need to clean up - the player's client already thinks the item has been tossed so the inventory needs to be re-sent to the player.

To get the item that is about to be tossed, call the [[API:cPlayer|cPlayer:GetEquippedItem]] function.

===== Function signature =====
<code lua>
function OnPlayerTossingItem(Player)
</code>
Parameters:
| Player | [[API:cPlayer|cPlayer]] | The player who is tossing the item |

===== Return values =====
If the function returns false or no value, other plugins' callbacks are called and finally MCServer creates the pickup for the item and tosses it, using [[API:cPlayer|cPlayer:TossItem]]. If the function returns true, no other callbacks are called for this event and MCServer doesn't toss the item.

===== Registering the callback =====
To register your plugin to receive a callback through this function, use the hook [[api:plugin:hooks|HOOK_PLAYER_TOSSING_ITEM]]
<code lua>
cPluginManager:Get():AddHook(Plugin, cPluginManager.HOOK_PLAYER_TOSSING_ITEM);
</code>
