I need help to detect when a player craft certain items but it don't seem to have something in afterEvent or beforeEvent, so I was thinking about crafting a dummy item to activate the script I want but I don't find how I can check the player inventory with scripting nor launching a script with Minecraft command so if anyone can help me?
#detect when a player craft special item
1 messages · Page 1 of 1 (latest)
unfortunately there's no 100% accurate or any way to detect crafting as of now.
mmmmh that annoying can't detect special item in an inventory ?
Into inventory, yes you can. Player.getComponent("inventory"). container?.getItem(slot);
That's getting the from a slot, who's to say that's the item that was just crafted?? Like Coddy said, there is no real 100% accurate way, you can infer from certain things like checking the inventory before using a crafting table and then again afterwards and what ever is different you can assume was just crafted, but that also could have been dropped into you inventory by somebody else
can I store an inventory of a player in a array ?