I'm now trying desperately to fix our broken OnBlockPlace / OnBlockDig framework. Right now I have this:
OnPlayerLeftClick() - fires everytime we get a left-click packet; parameters are the raw packet data. Plugin may stop entire processing by returning true.
OnPlayerRightClick() - same as OnPlayerLeftClick(), but for rclk. Plugin may stop entire processing by returning true.
OnPlayerBreakingBlock() - called just before a player breaks a block, and really only breaks a block, nothing else lclk-related. Plugin may stop the breaking by returning true.
OnPlayerBrokenBlock() - called just after a player has broken a block, and only when a block was really broken. Plugin cannot stop the breaking anymore, it's been already done.
OnPlayerPlacingBlock() - called just before a player places a block. Plugin may stop the placement by returning true.
OnPlayerPlacedBlock() - called just after a player placed a block. Plugin cannot stop the placement anymore, it's been already done.
OnPlayerUsingBlock() - called just before a player uses a block (chest, furnace etc.). Plugin may refuse.
OnPlayerUsedBlock() - called just after a player used a block (chest, furnace etc.). Plugin cannot refuse. Note that the client may still be displaying the UI - it's not about clising the UI window, it's about sending the "OpenWindow" packet.
OnPlayerUsingItem() - called just before a player uses an item in their hand (Probably buckets? dunno exactly. Not for tools, those get the OnPlayerBreakingBlock et al). Plugin may refuse.
OnPlayerUsedItem() - called just after a player used an item in their hand. Plugin cannot refuse.
OnPlayerShooting() - called before a player uses a ranged weapon (not fully implemented yet)
OnPlayerEating() - called before a player eats food (not fully implemented yet)
OnPlayerTossingItem() - called before a player tosses an equipped item (Q keypress). Plugin may refuse, but has to fix things on the client (inventory mismatch)
Also, I'm renaming a few hooks to match this schema. So basically, I'm breaking all plugins
Oh, yeah, and OnBlockPlace and OnBlockDig are gone, so, really, breaking all plugins
OnPlayerLeftClick() - fires everytime we get a left-click packet; parameters are the raw packet data. Plugin may stop entire processing by returning true.
OnPlayerRightClick() - same as OnPlayerLeftClick(), but for rclk. Plugin may stop entire processing by returning true.
OnPlayerBreakingBlock() - called just before a player breaks a block, and really only breaks a block, nothing else lclk-related. Plugin may stop the breaking by returning true.
OnPlayerBrokenBlock() - called just after a player has broken a block, and only when a block was really broken. Plugin cannot stop the breaking anymore, it's been already done.
OnPlayerPlacingBlock() - called just before a player places a block. Plugin may stop the placement by returning true.
OnPlayerPlacedBlock() - called just after a player placed a block. Plugin cannot stop the placement anymore, it's been already done.
OnPlayerUsingBlock() - called just before a player uses a block (chest, furnace etc.). Plugin may refuse.
OnPlayerUsedBlock() - called just after a player used a block (chest, furnace etc.). Plugin cannot refuse. Note that the client may still be displaying the UI - it's not about clising the UI window, it's about sending the "OpenWindow" packet.
OnPlayerUsingItem() - called just before a player uses an item in their hand (Probably buckets? dunno exactly. Not for tools, those get the OnPlayerBreakingBlock et al). Plugin may refuse.
OnPlayerUsedItem() - called just after a player used an item in their hand. Plugin cannot refuse.
OnPlayerShooting() - called before a player uses a ranged weapon (not fully implemented yet)
OnPlayerEating() - called before a player eats food (not fully implemented yet)
OnPlayerTossingItem() - called before a player tosses an equipped item (Q keypress). Plugin may refuse, but has to fix things on the client (inventory mismatch)
Also, I'm renaming a few hooks to match this schema. So basically, I'm breaking all plugins
Oh, yeah, and OnBlockPlace and OnBlockDig are gone, so, really, breaking all plugins