Hook names
#1
I find it rather confusing that hook names have an E_PLUGIN_ prefix. I'd like to rename them to use HOOK_ prefix instead, while keeping a copy of the old prefix for compatibility reasons. Newly created hooks will have only the HOOK_ prefix and no E_PLUGIN_ counterpart. What does the plugin community think about this?
Reply
Thanks given by:
#2
I'm fine with that Smile
Reply
Thanks given by:
#3
And any renaming to add consistency?
Reply
Thanks given by:
#4
Change the block place hook to right click or something?
Reply
Thanks given by: Taugeshtu
#5
We might want to consider two hooks, HOOK_RIGHT_CLICK and HOOK_BLOCK_PLACE. The one for rclk is called each time a player rclks; blockplace is called only when that rclk is translated into an actual block being placed. So using a hoe, for example, will trigger rclk, but not blockplace.

For this reason, I'm not inclined to just rename the hook, it needs deeper discussion.
Reply
Thanks given by: Taugeshtu
#6
My suggestion is to add right click as separate hook, and add left click as separate hook as well. Because, as I understand, MCS passes OnBlockDig only if it's within digging range, right?
And still, more hooks will make stuff clear Smile
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)