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

InventoryClickEvent setCancelled(true) results in duping the item

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • 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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: