Cancel crafting of items

Hello there,

I know this question has been more or less already asked but there’s no real response to that so I’m asking it here.

How could I do to prevent/cancel the crafting of a specific item ? Since there’s no explicit crafting event, I don’t how to achieve that “the good way” :wink:

Really there is no “good way” right now. I’ve tried a few things in my StackBan plugin but in the end the only reliable workaround was to just blacklist items by removing them as they enter players inventory. Detecting crafting tables last time I checked doesn’t want to work plus with mods thrown in the mix probably would just cause players to discover exploits. Now grant it I haven’t tested anything in a month or so maybe someone knows a better way now.

Check my source and see if anything interests you

I think you can use forge’s CraftingManager (or forge in general), i dont know if it works but addRecipe works (even without seeing the item before you click it).
Also you’ll need to add forge to your plugin of course.
Because Sponge crafting manager isn’t implemented yet :confused: (correct me if i’m wrong)
I hope i’m not necroposting D:

Edit: try this, i’m at school right now

you can do by a way but it’s not the easiest one!!!

you check inventory click event and you verify the block if the item at the result case is an item, set item to empty.

i’ve not tested but it shoud work