Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7234

Desync when inventory interaction is cancelled after client has already closed the inventory view


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • This server is running CraftBukkit version dev-Spigot-61bffe0-19e6be0 (MC: 1.19.3) (Implementing API version 1.19.3-R0.1-SNAPSHOT)
    • Yes

      • Open some inventory view for a player.
      • Player performs some inventory action that moves an item from the view into their inventory.
      • Insert network delay here. (I was able to reproduce this locally with the tool called "clumsy" which adds network delay to each outgoing/incoming packets.)
      • Player closes the inventory again on the client-side.
      • A plugin cancels the inventory interaction on the server: The item is not actually moved to the player's inventory.

      With enough network delay involved, the player's inventory on the client side is not updated to reflect the updated state of the server. I.e. the player can still see the moved item in their inventory until some subsequent inventory interaction results in the client-side state to be updated.

      Client-side inventory state is updated, regardless of whether the player closes the inventory.

      If the player does not close the inventory menu before the inventory interaction is cancelled on the server, the server already informs the client about the inventory change which moves the item back.

            Unassigned Unassigned
            blablubbabc blablubbabc
            0 Vote for this issue
            2 Start watching this issue