====== OnPlayerUsingItem hook callback function ======
OnPlayerUsingItem() is called when a player has right-clicked a block with an item that can be used (is not placeable, is not food and clicked block is not use-able), such as a bucket or a how. It is called before MCServer processes the usage (places fluid / turns dirt to farmland). Plugins may refuse the interaction by returning true.

To get the world at which the right-click occurred, use the [[API:cPlayer|cPlayer:GetWorld]]() function. To get the item that the player is using, use the [[API:cPlayer|cPlayer:GetEquippedItem]]() function.

===== Function signature =====
<code lua>
function OnPlayerUsingItem(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ, BlockType, BlockMeta)
</code>
Parameters:
| Player | [[API:cPlayer|cPlayer]] | The player who has used the block |
| BlockX | number | X-coord of the block being clicked |
| BlockY | number | Y-coord of the block being clicked |
| BlockZ | number | Z-coord of the block being clicked |
| BlockFace | number | Face of the block being clicked through which the interaction was made. One of the BLOCK_FACE_ constants |
| CursorX | number | X-coord of the cursor crosshair on the block being clicked |
| CursorY | number | Y-coord of the cursor crosshair on the block being clicked |
| CursorZ | number | Z-coord of the cursor crosshair on the block being clicked |
| BlockType | BLOCKTYPE | BlockType of the block being clicked |
| BlockMeta | NIBBLETYPE | BlockMeta of the block being clicked |

===== Return values =====
If the function returns false or no value, other plugins' callbacks are called and then MCServer processes the interaction. If the function returns true, no other callbacks are called for this event and the interaction is silently dropped.

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