InventoryClickEvent setCancelled(true) results in duping the item

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:

      Windows 10 Pro

      Java 8

      CraftBukkit version git-Spigot-138d451-e5cb519 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)

    • 1.16.x
    • Yes

      I'm creating a custom potions plugin.

      I have a potion with custom model data that if you consume, it sends a packet to all players (PacketPlayOutEntityEquipment, helmet to dragon head).

      First, if you take it off, it should disappear, because it's not supposed to be in the inventory, it's just a packet. However, the player is able to take it off, it doesn't disappear (probably an NMS bug).

      The Spigot bug is: when the InventoryClickEvent gets canceled, it dupes the item (stays in the slot, but gets added to the cursor). This only happens in creative mode.

          [SPIGOT-6346] InventoryClickEvent setCancelled(true) results in duping the item

          NooTChhYT added a comment -

          Thanks for the feedback.

          I don't know much about the client side, but if @md_5 says something, that's probably correct 

          NooTChhYT added a comment - Thanks for the feedback. I don't know much about the client side, but if @md_5 says something, that's probably correct 

          md_5 added a comment -

          > This only happens in creative mode.

          Probably can't be fixed then, creative mode is client authoritative.

          md_5 added a comment - > This only happens in creative mode. Probably can't be fixed then, creative mode is client authoritative.

          NooTChhYT added a comment - - edited

          In survival mode, the dragon head gets removed, and the dupe doesn't occur.

          The server is running CraftBukkit version git-Spigot-138d451-e5cb519 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)

          NooTChhYT added a comment - - edited In survival mode, the dragon head gets removed, and the dupe doesn't occur. The server is running CraftBukkit version git-Spigot-138d451-e5cb519 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)

          Black Hole added a comment -

          Please provide the output of the /version command.

          Please test that it happens in survival game mode, too.

          Black Hole added a comment - Please provide the output of the /version command. Please test that it happens in survival game mode, too.

            Assignee:
            Unassigned
            Reporter:
            NooTChhYT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: