====== OnPlayerPlacingBlock hook callback function ======
OnPlayerPlacingBlock is called just before a player places a block in the world. The block is not yet placed, plugins may choose to override the default behavior or refuse the placement at all.

Note that the client already expects that the block has been placed. For that reason, if a plugin refuses the placement, MCServer sends the old block at the coords provided to the client.

Use the [[API:cPlayer|cPlayer]]:GetWorld() function to get the world to which the block belongs.

===== Function signature =====
<code lua>
function OnPlayerPlacingBlock(Player, BlockX, BlockY, BlockZ, BlockFace, CursorX, CursorY, CursorZ, BlockType)
</code>
Parameters:
| Player | [[API:cPlayer|cPlayer]] | The player who is placing the block |
| BlockX | number | X-coord of the block being placed |
| BlockY | number | Y-coord of the block being placed |
| BlockZ | number | Z-coord of the block being placed |
| BlockFace | number | Face of the existing block with which the client interacted to place this block |
| CursorX | number | X-coord of the cursor within the block face |
| CursorY | number | Y-coord of the cursor within the block face |
| CursorZ | number | Z-coord of the cursor within the block face |
| BlockType | BLOCKTYPE | Block type of the block being placed |
| BlockMeta | NIBBLETYPE | Block meta of the block being placed |

===== Return values =====
If this function returns false or no value, MCServer calls other plugins with the same event and finally places the block and removes the corresponding item from player's inventory. If this function returns true, no other plugin is called for this event, MCServer sends the old block at the coords specified to the client and drops the packet.

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