Skip to content

Client not updated after cancelling HandlePlace event. #749

Open
@TacoError

Description

@TacoError

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions