dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

Client not updated after cancelling HandlePlace event.

Open TacoError opened this issue 2 years ago • 0 comments

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

TacoError avatar Feb 12 '23 00:02 TacoError