-
Bug
-
Resolution: Invalid
-
Minor
-
None
-
None
-
OS: Windows 10 Pro 1903 64-bit
Jdk 13.0.1 64-bit
-
This server is running CraftBukkit version git-Spigot-56f8471-606c19e (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
-
Yes
public class InventoryClickListener implements Listener { @EventHandler public void handleInventoryClick(InventoryClickEvent e) { e.getCurrentItem().getType(); //NullPointerException } @EventHandler public void handlePlayerJoin(PlayerJoinEvent e) { Inventory inv = Bukkit.createInventory(e.getPlayer(), InventoryType.CHEST); //Other types are working too e.getPlayer().openInventory(inv); }}
If you donĀ“t click on a block in fake inventories, getting the item type causes a NullPointerException. It should return Material.AIR if the player clicked on an empty slot and null if the player clicked outside the inventory or something similar.