CanTakeCutting/OnTakeCutting hooksSolved

Hi,

I was trying to prevent users from gathering plants from planter boxes that they do not own. And I'm able to do that for gathering using `OnCropGather` hook, but it's not possible to handle Take Cutting (take clone). I've checked the `PlantEntity` class where RPC is handled, but can't see any Hooks that are called.

I see a solution how I can implement it in my case:

1. OnItemAddedToContainer

2. check if it's a clone (`item.info.shortname.contains("clone")`)

3. Raycast user head ray

4. if ther is a planter box, and it's not owned by user -> remove item from container and "plant a plant" but some information cannot be restored (grow progress and so on).

nice hook would be:

`object CanTakeCutting(PlantEntity plant, BasePlayer player)`

Please let me know if I'm missing something

Added object CanTakeCutting(BasePlayer, PlantEntity)
Fantastic, thanks a lot
Added for next update, didn’t make it in with today.
Locked automatically