Open
Description
If the HandlePlace event is cancelled, and the item in the slot is set to air, the client still has the item in their inventory, but on server side it is still there.
Code:
func (i *InventoryHandler) HandlePlace(ctx *event.Context, slot int, it item.Stack) {
_, err := i.p.Inventory().Item(slot)
if err != nil {
return
}
ctx.Cancel()
fmt.Println("hello")
i.p.Inventory().SetItem(slot, item.Stack{})
}
Video example: https://streamable.com/x62xwv