[SPIGOT-7301] Missing InventoryTypes in CraftInventoryCreator Created: 17/Mar/23  Updated: 25/Dec/24  Resolved: 19/Mar/23

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: LimeGlass Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None

Version: 1.19.4
Guidelines Read: Yes

 Description   

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);


 Comments   
Comment by montlikadani [ 19/Mar/23 ]

PR opened to prevent opening these 2 inventory #828

Comment by LimeGlass [ 17/Mar/23 ]

It's being ran dynamically from user input, sure it can't be opened, but it also shouldn't be throwing a NullPointerException.

Also it's defined as Creatable in InventoryType

Comment by md_5 [ 17/Mar/23 ]

These inventories can't be opened though?

What are you trying to do?

Generated at Sat Dec 13 13:38:11 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.