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

Missing InventoryTypes in CraftInventoryCreator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • 1.19.4
    • Yes

      NullPointerException when creating an inventory for type CHISELED_BOOKSHELF or COMPOSTER

      java.lang.NullPointerException: Cannot invoke 
      "org.bukkit.craftbukkit.v1_19_R2.inventory.util.CraftInventoryCreator$InventoryConverter.createInventory(org.bukkit.inventory.InventoryHolder,
       org.bukkit.event.inventory.InventoryType)" because the return value of 
      "java.util.Map.get(Object)" is null
      
           at 
      org.bukkit.craftbukkit.v1_19_R2.inventory.util.CraftInventoryCreator.createInventory(CraftInventoryCreator.java:43)
      
           at org.bukkit.craftbukkit.v1_19_R2.CraftServer.createInventory(CraftServer.java:2084)
      
           at org.bukkit.Bukkit.createInventory(Bukkit.java:1517)

      Code

      Bukkit.createInventory(null, InventoryType.COMPOSTER);

            Unassigned Unassigned
            LimeGlass LimeGlass
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: