====== OnPlayerLeftClick hook callback function ======
MCServer calls this callback whenever it receives a left-click packet from the client. It is called before any processing whatsoever is performed on the packet, meaning that hacked / malicious clients may be trigerring this event very often and with unchecked parameters. Therefore plugin authors are advised to use extreme caution with this callback.

Plugins may refuse the default processing for the packet, causing MCServer to behave as if the packet has never arrived. This may, however, create inconsistencies in the client - the client may think that they broke a block, while the server didn't process the breaking, etc. For this reason, if a plugin refuses the processing, MCServer sends the block specified in the packet back to the client (as if placed anew), FIXME even if the status code specified a different action.

The client sends the left-click packet for several other occasions, such as dropping the held item (Q keypress) or shooting an arrow. This is reflected in the Status code. Consult the [[http://wiki.vg/Protocol#0x0E|protocol documentation]] for details on the statuses.

===== Function signature =====
<code lua>
function OnPlayerLeftClick(Player, BlockX, BlockY, BlockZ, BlockFace, Status)
</code>
Parameters:
| Player | [[API:cPlayer|cPlayer]] | The player whose client sent the packet |
| BlockX | number | X-coord of the block |
| BlockY | number | Y-coord of the block |
| BlockZ | number | Z-coord of the block |
| BlockFace | number | Face of the block through which the player is interacting. One of the BLOCK_FACE_ constants |
| Status | number | Status code in the packet |

===== Return values =====
If the function returns false or no value, MCServer calls other plugins' callbacks and finally sends the packet for further processing. If the function returns true, no other plugins are called, processing is halted, MCServer sends the block specified in the coords back to the client and the packet is dropped.

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