====== OnCollectingPickup hook callback function ======
OnCollectingPickup is called when a player is about to collect a pickup. Plugins may refuse the action.

Pickup collection happens within the server tick, so if the collecting is refused, it will be tried again in the next tick, as long as the player is within reach of the pickup.

FIXME There is no OnCollectedPickup() callback.

FIXME This callback is called even if the pickup doesn't fit into the player's inventory.

===== Function signature =====
<code lua>
function OnCollectItem(Player, Pickup)
</code>
Parameters:
| Player | [[API:cPlayer|cPlayer]] | The player who's collecting the pickup |
| Pickup | [[API:cPickup|cPickup]] | The pickup that is about to be collected |

===== Return Values =====
If the function returns false or no value, MCServer calls other plugins' callbacks and finally the pickup is collected. If the function returns true, no other plugins are called for this event and the pickup is not collected.

===== Register Callback =====
To register your plugin for a callback on this function use the hook [[api:plugin:hooks|HOOK_COLLECTING_PICKUP]]
<code lua>
PluginManager = cPluginManager:GetPluginManager();
PluginManager:AddHook(Plugin, cPluginManager.HOOK_COLLECTING_PICKUP);
</code>