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

Hopper Inventory Bug

XMLWordPrintable

    • CraftBukkit version git-Spigot-69774b3-671581e (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT)
    • Yes

      When you create multiple Inventories in your plugin (like this: Inventory inv = Bukkit.createInventory(null, InventoryType.HOPPER, name) ) and store them in variables (e.g.: private static Inventory inv) or HashMaps, and you open one of them, it appears that spigot "thinks" that all inventories are the same (I open them with Player.openInventory(inv)). Also they all sort of merge their contents and override their titles.
       You can see that the appear to be the same when you check in an InventoryClickEvent if the clicked Inventory is equals to an inventory stored in a HashMap or Variable (via if(EventInventory.equals(storedInventory)). 
      In 1.12 this Bug didn't exist and it also seems to work only with Hopper Inventories.

            Unassigned Unassigned
            DerToaster DerToaster
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: